Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lucina Ferrrari   on Feb 08 In MS Office Category.

  
Question Answered By: Madeeha Malik   on Feb 08

Basically this was a problem solved long ago. event  disabling in a userform
module does not work. So we have to manually create an event type variable to
control flow in the userform  initialize method.

Heres how you go about doing it

declare a variable global as boolean

Dim userEvent as boolean

Private Sub UserForm_Initialize()
userEvent = False
End Sub

Private Sub TextBox1_Change()

If userEvent = False Then
.........Your Code here......
End if
End Sub


Your second question also came at a good time as I had the same problem
yesterday. Managed to solve it.

TextBox1.Text = sheets(4).Range("Cell_Name").Cells(1, 1).Value

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Can't disable events in UserForm Or get search suggestion and latest updates.


Tagged: