Click to See Complete Forum and Search --> : Excel macros and visual basic


msawaya
April 11th, 2001, 11:50 AM
I am tring to write a little vb program that will load and unload a macro in excel. It suprisingly won't load automatically when initiated. The excel spreadsheet will eventually be loaded in task-scheduler on a specified time basis so I don't really want to use any forms with vb in which I will have to click an actual button. Any ideas on how I should do this?

Iouri
April 11th, 2001, 12:02 PM
If I understand you correctly you want to execute macro when Excel is startted.

Insert this code into module
sub Auto_open()
Your macro
end sub

Your macro will run every time you open excel

Iouri Boutchkine
iouri@hotsheet.com