PDA

View Full Version : VBA to automatically run



preseb
04-01-2011, 11:41 AM
what are my options to get VBA to automatically run?

What I would really like is to have VBA to automatically run on a specific date - without having to open anything.

From what I have found that does not seem possible.

Can I get VBA to automaically run if I have excel open, but not a specific file?



any help or suggestion are greatly appreciated

mikerickson
04-01-2011, 11:51 AM
The OnTime method will do that.

preseb
04-01-2011, 11:53 AM
I did come across the OnTime method. can I apply that so that it works without having to open excel? If so, how and where can I apply it?

Thank you

BrianMH
04-01-2011, 12:54 PM
You could create a bat file to open an excel file and then use windows task manager to run the bat file. Then in your excel file use an auto_open macro to call your code.

vzachin
04-01-2011, 04:42 PM
i use Scheduled Tasks in XP to run a daily script twice a day.