hello, i have an this sub that initializes a Class event that runs code on any change of the selection. I wanted to assign a Macro button to "turn off" the event.
Whats the proper VBA to 'de-initialize' the event? thanks
Code:
Sub LoadMonitor()
Set selMonitor = New Class1
MsgBox "Selection Change On"
End Sub
'stored in Class Module
Option Explicit
Private WithEvents mWordApp As Word.Application
Private Sub Class_Initialize()
Set mWordApp = Word.Application
End Sub
Private Sub mWordApp_WindowSelectionChange(ByVal Sel As Selection)
'code here for selection change