Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call a sub from different file
Sorry for this basic question, I just can't seem to find
the answer in 'Help' ... imagine that! I have a macro that takes over an hour to run. We'd like to have a scheduler PC run this early in the morning. Being on a scheduler, the macro cannot have any user input. Also, I don't want to make it an autoexec macro because the user might want to go into the file during the day and NOT want the macro to run. I'm thinking of having the scheduler PC execute a macro in a different file that runs the big macro. But I'm having trouble simply calling the macro from a different file. Isn't it possible to run a macro in a different file? Example: File1 contains Sub Test1() and File2 contains Sub Test2(). Can't Test1 call Test2???? Thank You! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call a sub from different file
Norm,
Yes it can, you just use application.run for example Application.Run "file2.xls!test2" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Norm" wrote in message ... Sorry for this basic question, I just can't seem to find the answer in 'Help' ... imagine that! I have a macro that takes over an hour to run. We'd like to have a scheduler PC run this early in the morning. Being on a scheduler, the macro cannot have any user input. Also, I don't want to make it an autoexec macro because the user might want to go into the file during the day and NOT want the macro to run. I'm thinking of having the scheduler PC execute a macro in a different file that runs the big macro. But I'm having trouble simply calling the macro from a different file. Isn't it possible to run a macro in a different file? Example: File1 contains Sub Test1() and File2 contains Sub Test2(). Can't Test1 call Test2???? Thank You! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to call a reference to a cell in external file | Excel Worksheet Functions | |||
Call a batch file from an Excel Macro | Excel Discussion (Misc queries) | |||
VBA to call file based on date | Excel Discussion (Misc queries) | |||
Call macros from another XL file | Excel Programming | |||
Subroutine call without file reference | Excel Programming |