View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Temporarily Disabling an Event Macro

Excellent! Thank you very much.


-----Original Message-----
You could attach this to a button or keyboard shortcut:


Public Sub EventsToggle()
With Application
.EnableEvents = Not .EnableEvents
MsgBox "Event macros are " & _
IIf(.EnableEvents, "dis", "en") & "abled."
End With
End Sub

In article ,
"stratuser" wrote:

I have an event macro on a worksheet. Sometimes, I

want
to disable the event macro while I do some monthly
maintenance work on the data on the worksheet. I am
looking for ways to do this that don't require the user

to
go into the VBA module (i.e., I don't want him to have

to
comment out the VBA code). Any ideas?

.