Excel 2003 WorkbookOpen - TechRepublic
General discussion
March 28, 2006 at 11:33 PM
vosa

Excel 2003 WorkbookOpen

by vosa . Updated 19 years, 2 months ago

I use Excel 2003 and would like to do a few initializations when my workbook opens. In WORD I use AutoOpen macro for that purpose, but it is not available in Excel. So I followed instructions given in Help for VB, created a new Class module named Class1 (it is not possible to rename it) and wrote the code below as a first probe. I saved the workbook and opening no message box appeared. (Nothing happend and I wonder as under the lemmon tree). Where I made a mistake? Thanks for any advice. Vosa
—————————-

Public WithEvents App As Application
Dim X As New Class1

Sub InitializeApp()
Set X.App = Application
End Sub

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
MsgBox (“START”)
End Sub

This discussion is locked

All Comments