View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norm[_5_] Norm[_5_] is offline
external usenet poster
 
Posts: 12
Default 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!