Re: CONCLUSION: No one knows about EVENT CLASS proccedures
Posted by JohnG on February 01, 2002 5:45 AM
Continuation of
18985.html
SheetChange event is not working? I have a BeforeClose and BeforeSave events and they are fine set up as new class events. Below is an extract of the code I am using.These are new class events so that they works on any workbook that is open not just the one they are in.
--In AppEventClass
Public WithEvents Appl As Application
Private Sub Appl_Workbook_SheetChange(ByVal Sh As
Object, ByVal Source As Range)
Dim ApplicationClass As New AppEventClass ' Creates variable to be used to activate events.
--In Thisworkbook
Private Sub Workbook_Open()
Set ApplicationClass.Appl = Application 'Actives all events created in AppEventClass.
End Sub