View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
M Smith M Smith is offline
external usenet poster
 
Posts: 1
Default Can't get Workbook_Open event to work

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