Events

  • Thread starter Thread starter Patros
  • Start date Start date
P

Patros

Hello,
Is there any possibility to temporarily disable the event procedures in vba
like in Excel (where, if I'm right it is something like
"Application.EnableEvents=True/False")?
Thank you
 
Not that I know of.

However, since you can write code to do almost any data operation, then
generally that feature is not missed.
 
You could declare a global variable

Global varEnabled as Boolean

then at the begining of each event check to see if varEnabled = True

If varEnabled = True then
....
code
....
End if

then all you need to do is change the variable to turn events on or off
obviously the event that changes the vaeEnable would not have the

If varEnabled = True then
....
code
....
End if

code at the beginning of it.
 
Back
Top