![]() |
|
#1
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
I would like a function to add sequential numbers to a class number/name
|
Highlander01 | Excel | 5 | 01-22-2016 02:29 PM |
| Is it possible to bind macros to keys not in the KeyCodeConstants class? | AlexR | Word VBA | 4 | 04-08-2013 10:15 AM |
| Evernote--Class Notes | markg2 | Outlook | 0 | 05-10-2012 05:50 PM |
| Looking for easy and quick way to draw on class notes "x-rays - image" | Lacrosseboss18 | PowerPoint | 0 | 02-04-2011 01:21 PM |
| Want to search for "class", replacing with document property | YetAnotherAuthor | Word | 0 | 10-30-2009 09:43 AM |