Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Menu with Macro doesn't save. Brijesh Excel Discussion (Misc queries) 2 December 12th 07 11:35 PM
custom menu winqan Excel Discussion (Misc queries) 1 February 6th 06 10:51 AM
Custom Menu Help EAB1977 Excel Worksheet Functions 1 November 12th 05 01:02 AM
How do I add a macro to a custom menu? MikeCyng Excel Discussion (Misc queries) 6 October 24th 05 02:56 PM
Macro as Custom Menu Command Clint Marshall Excel Programming 6 September 26th 03 07:20 PM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"