AutoExec in VBA

B

BOONER

How do I write code in a module that will act like an AutoExec macro?
Basically, I need the same results that "sub Auto_open()" would give in
Excel.
 
D

Douglas J. Steele

Create an AutoExec macro that calls your code. (Remember that macros can
only call Functions, not Subs)
 
K

Klatuu

Write your code as a function.
Use the RunCode action in the Autoexec macro and specify the name of the
function.
The RunCode action will only run functions. No return value is required.
 
B

BOONER

Thanks

Klatuu said:
Write your code as a function.
Use the RunCode action in the Autoexec macro and specify the name of the
function.
The RunCode action will only run functions. No return value is required.
 
Top