Call another macro under Workbook Auto_open?


Posted by Bob on August 31, 2000 2:12 PM

What is the syntax for calling another macro under
auto_open (or in any other macro w/a case statement maybe)?

Thanks
Bob

Posted by Bob on September 01, 0100 11:28 AM

Thanks Celia




Posted by Celia on August 31, 0100 4:36 PM


Bob
If the macro is in the same workbook, just type the macro name on one line of the Auto_Open macro.
Alternatively, you can prefix the name with the word Call - this is not necessary but makes the code easier to read.

If the macro is in another workbook :-

Run macro:="filename.xls!macroname"

OR

Application.Run "filename.xls!macroname"

If the file name includes spaces, enclose it in single quotes:-
Run "'file name.xls'!macroname"

Celia