View Single Post
 
Old 05-01-2017, 04:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by ilcaa72 View Post
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?
There is no facility to do that. Either put your event code into a template that applies only to documents based on that template - so it doesn't affect documents based on other templates - or add some error trapping to ensure the event exits unless the document or selection conforms to certain specifications.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote