Dave Peterson wrote
Try putting:
Option Explicit
Dim AppClass As New clsAppEvents
Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub
Not in a general module (module1), but in the ThisWorkbook Module.
If you want to read more about application events, visit Chip Pearson's
site:
http://www.cpearson.com/excel/AppEvent.htm
Chip also has a sample workbook there that you can download and test out.
Dave,
Just a follow up question to assist with my understanding.
In the ThisWorkbook Module, we placed a Work_Open() event handler which
instantiated the Class Module called clsAppEvents. In the clsAppEvents, we
have another workbookopen event handler called App_WorkbookOpen(ByVal Wb As
Workbook). My question is, why not just use the Work_Open() event handler
in the ThisWorkbook Module? Why use two event handlers that act upon the
workbook being opened?
I did read Chip's site that you referenced. That was helpful. I am going
to soak on it over night and then follow up with some questions tomorrow.
Again, thank you for your patience and assistance.
Best regards,
Kevin