AutoExec in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Create an AutoExec macro that calls your code. (Remember that macros can
only call Functions, not Subs)
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top