Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tied a button to a macro with (using a macro):
commandbars("Custom 2").Controls(1).OnAction = "'C:\Documents and Settings\togilvy\Application Data\Microsoft\AddIns\File2.xla'!button_click" I then queried it in the immediate window: ? commandbars("Custom 2").Controls(1).OnAction 'C:\Documents and Settings\togilvy\Application Data\Microsoft\AddIns\File2.xla'!button_click When I pressed the button, the Addin was opened and the macro executed. Perhaps you can do the same (better yet, select the addin in tools=Addins so it is automatically loaded) -- Regards, Tom Ogilvy wrote in message ... Ah, got you now - sorry. I've tried that just now but unfortunately still get the same error. I've completely removed the macro assignment and then reassigned it without any luck. -----Original Message----- You said you assigned it, then moved the file with the macro (as i understood you). Excel isn't congnizant of that change and apparently doesn't search for it (default file location would have no effect in this situation) or you wouldn't get the message. Assign the macro as you did in the past, but do it after you move the file. -- Regards, Tom Ogilvy "RichardB" wrote in message ... Thanks Tom - not sure I follow you. How do I reassign the button correctly, as I've already done so via the customize menu option several times without any luck - does it need to be done elsewhere? -----Original Message----- You need to reassign the macro (from it new location) to the button. in the immediate window you can query the onaction property of the control to see where it is point. It will be pointing to the wrong location if you get this message. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2000 Custom Menu Item | Excel Discussion (Misc queries) | |||
VBA-Make Custom Menu Item Fire | Excel Programming | |||
Setting OnAction of custom menu item? | Excel Programming | |||
Custom Menu Item specific to a workbook | Excel Programming | |||
Problems deleting custom menu = double entries | Excel Programming |