VBA run at upon opening

  • Thread starter Thread starter KENNY
  • Start date Start date
K

KENNY

I have a nice macro that is assigned to a button.
However, I would now like it to run whenever I open it up
(tied to a .bat file in Windows Scheduler). Is there easy
code I can simply add at the beginning to make this happen?

Thanks in advance.
 
Hi Kenny
two ways:
1. In your workbook module (not in a standard module) use the
Workbook_Open() event procedure

2. Rename your macro to Auto_Open()
 

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