View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Kilmer Bob Kilmer is offline
external usenet poster
 
Posts: 280
Default Disable Change Event in Form

The Change event will fire when it fires. You cannot control it directly.
You can ignore it by not having a Change event handler, or you can have a
module-level or global variable in the Change event handler whose value
determines whether or not the code actually does anything. You can set the
value of this variable depending on other events and conditions.


Private Sub Text1_Change()

If mAllowChangeEvent Then
'do stuff
End If

End Sub

Private Sub Text2_Change()

If mIgnoreChangeEvent Then Exit Sub
'do stuff

End Sub

wrote in message
anews.com...
Hi,

I've tried a variety of things including
Application.EnableEvents = False
. . . change textbox . . .
Application.EnableEvents = True
but I have not been able to prevent the
change event from firing.

What am I missing? Is it possible to
stop the Change event from within the
form code?

Thanks,

David