Auto_Open() macro in excel97
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.
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.
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.
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
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)
*
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
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)
*
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
Nevermind... I finally got auto_open() to work. Not sure why though.