Application, WithEvents. CAppEvents.
Private WithEvents mxlApp As Application
Public Property Set App(xlApp As Application)
Set mxlApp = xlApp
End Property
(Ctrl + F2) mxlApp. SheetChange. , .
Private Sub mxlApp_SheetChange(ByVal Sh As Object, ByVal Target As Range)
End Sub
- , . , , , . , Sh.Parent .
, - .
Public gclsAppEvents As CAppEvents
Sub Auto_Open()
Set gclsAppEvents = New CAppEvents
Set gclsAppEvents.App = Application
End Sub
public . Auto_Open , .