![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 7
|
I have two XLA containing macro (setup.xla and main.xla).
I have a toolbar with button that should start macro. I want to set the button with a macro from SETUP.XLA to start macro from MAIN.XLA. My line in SETUP.XLA, to set the button, is : Toolbars(sTBName).ToolbarButtons(TB_POSOPENTOOL).OnAction = StartProgram --> [StartProgram] is a macro in the MAIN.XLA file The problem i get is when i clic on the button Excel is looking for the macro [StartProgram] in SETUP.XLA and can't find it (because it's in MAIN.XLA). Is there any way to specify that the macro to start onAction is located in the MAIN.XLA and not in SETUP.XLA ? Thanks ! |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 7
|
I really need help with this one. I can't find anything in books...
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Minnesota
Posts: 821
|
Why can't you just assign the macro from main.xla to the button without referencing setup.xla?
|
|
|
|
|
|
#4 | |
|
New Member
Join Date: Apr 2002
Posts: 7
|
Quote:
I try to figure if there is a way to do it like that because i need it to work like that. I hope there is a solution ! |
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 7
|
No one has another idea ?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|