Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run macro from custom menu
XL2000 on W2K - I have a series of menus which load from
personal.xls. One command is to run a macro from a file that I have open (.OnAction = "TimeTracker_2004.xls! Process_Weekly_Data"). When called I get an error msg "A document with the name TimeTracker_2004.xls is already open." Is this a syntax problem? How can I run the code without reopening the file? TIA, ken |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run macro from custom menu
In the immediate window in the VBE, check what the onaction property of the
control actually refers to: ? Commandbars("Custom1").Controls(1).OnAction If the results doesn't match your TimeTracker_2004.xls file, then reset it to match. I suspect that you have changed the location of the file and Excel sees the reference and the actual file as being different. In any event, it might be easiest to delete and recreate the button or just go ahead and reassign the onAction property with the TimeTracker_2004.xls file open. -- Regards, Tom Ogilvy "ken smith" wrote in message ... XL2000 on W2K - I have a series of menus which load from personal.xls. One command is to run a macro from a file that I have open (.OnAction = "TimeTracker_2004.xls! Process_Weekly_Data"). When called I get an error msg "A document with the name TimeTracker_2004.xls is already open." Is this a syntax problem? How can I run the code without reopening the file? TIA, ken |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
run macro from custom menu
Thanks, it took the default file path.
-----Original Message----- In the immediate window in the VBE, check what the onaction property of the control actually refers to: ? Commandbars("Custom1").Controls(1).OnAction If the results doesn't match your TimeTracker_2004.xls file, then reset it to match. I suspect that you have changed the location of the file and Excel sees the reference and the actual file as being different. In any event, it might be easiest to delete and recreate the button or just go ahead and reassign the onAction property with the TimeTracker_2004.xls file open. -- Regards, Tom Ogilvy "ken smith" wrote in message ... XL2000 on W2K - I have a series of menus which load from personal.xls. One command is to run a macro from a file that I have open (.OnAction = "TimeTracker_2004.xls! Process_Weekly_Data"). When called I get an error msg "A document with the name TimeTracker_2004.xls is already open." Is this a syntax problem? How can I run the code without reopening the file? TIA, ken . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom Menu with Macro doesn't save. | Excel Discussion (Misc queries) | |||
custom menu | Excel Discussion (Misc queries) | |||
Custom Menu Help | Excel Worksheet Functions | |||
How do I add a macro to a custom menu? | Excel Discussion (Misc queries) | |||
Macro as Custom Menu Command | Excel Programming |