Thread
:
event that cannot be disabled?
View Single Post
#
2
Posted to microsoft.public.excel.programming
Claus Busch
external usenet poster
Posts: 3,872
event that cannot be disabled?
Hi,
Am Mon, 24 Feb 2014 06:28:41 -0800 (PST) schrieb
:
I turn events off and then back on... usually.
If I fail to re-enable them, is there an event that persists? Is there an event that will fire every time?
I ask because I have to set something up to allow the user to re-enable events I messed up. (or screen updating, or automatic cal ...)
if you set EnableEvents to false all events are disabled.
If your macro can fail try it with an errorhandler that events will be
enabled, e.g.:
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
On Error GoTo EventsOn
' your code
EventsOn:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch