Can't get Workbook_Open event to work

M

M Smith

Newbie question. I'm having a problem in Excel trying to get the
Workbook_open event to fire. I have opened up a the Visual Basic Editor
from Excel and from the Project Explorer, under VBAProject (Book2.xls), I
clicked on ThisWorkbook. This is the code I want to fire...

Private Sub Workbook_Open()
MsgBox "Hello, today's date is " & Format(Date, "ddd d mmm yyyy")
End Sub

After I save it and close Excel, I open up the Book2.xls again and no
message box is displayed. What am I doing wrong.

I'm using Excel 2000 SR-1 on Windows 2000.
Thanks
 
J

JulieD

Hi

you'll need to check that your security settings are set to medium (or
lower - however, not recommended) - tools / macro / security and then choose
enable macros if prompted.

Cheers
JulieD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top