Jump to content
Compatible Support Forums
Sign in to follow this  
ViolentGreen

Auto_Open() macro in excel97

Recommended Posts

I am trying to create a macro to run whenever a particular workbook is opened. I have done some searches and it appears that I just create a macro called Auto_Open().

 

To test this I used the code

 

Sub Auto_Open()

MsgBox ("test")

End Sub

 

This did not work. Can anyone tell me how to do this? Visual basic continues to baffle me.

Share this post


Link to post
Quote:
Quote:
I am trying to create a macro to run whenever a particular workbook is opened. I have done some searches and it appears that I just create a macro called Auto_Open().

To test this I used the code

Sub Auto_Open()
MsgBox ("test")
End Sub

This did not work. Can anyone tell me how to do this? Visual basic continues to baffle me.


All or most Microsoft "compound" OLE document types have an autoexec.macro... that's the one to look @!

(That's also the one that macro virii infect as well)

* smile

APK

P.S.=> & like autoexec.bat & your startup groups etc., you can bypass opening & running it by holding down the shift key as it opens... some extra "FYI"... apk


I don't know if I am understanding you or not.

Are you saying to use
Sub AutoExec()
MsgBox ("test")
End Sub

or

Sub AutoExec.macro()
MsgBox ("test")
End Sub

?

Neither of these seem to work. The AutoExec.macro doesn't like the '.'

Thanks

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×