Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto run a Macro 1

Status
Not open for further replies.

Croaks

Programmer
Jun 29, 2004
26
GB
Hi ive got a macro that is importing data from sage into Excel then saving it

I cant however get the AutoExec function to work, it wont even work for a simple pop up box

Ive made it work hundreds of times in Word so whats the catch in Excel to make it work?

Cheers for the help
 
Hi,

With Excel, you can't produce an executable file.
But you can launch your Macro as soon as the user open the Excel file.

Just put your code in a module and start your code like that:
Code:
Sub Auto_Open()
... your code ...
End Sub

Regards.
Rodie
 
thanks rodie, that solved one of my questions too ;-) it got rid of the change cell event in the spreadsheet that fired a sub in a module (i dont like convoluted)
 
Yup sorted mine too

Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top