Application.EnableEvents doesn’t work in a Userform’s module. If you want to temporarily disable events in Userforms, you have to do it manually. One way is to use a module-level Boolean variable. You set this variable to True when you want events disabled and wrap all your event code in an If statement to test the variable’s value.
In this example, there is a userform with two textboxes. Typing in TextBox1 is duplicated in TextBox2. If you type directly in TextBox2, you’ll see a message box for everything you type. But because we disable events with a module-level variable, typing in TextBox1 does not produce the message box, even though it changes TextBox2.
Dim mbEvents As Boolean
Private Sub TextBox1_Change()
mbEvents = True
Me.TextBox2.Text = Me.TextBox1.Text
mbEvents = False
Private Sub TextBox2_Change()
If Not mbEvents Then