[FONT=Tahoma, Microsoft Yahei, Simsun]I created 2 userforms. Each userform has a text box. When the last letter of textbox is “E", close current userform, and open another one. [/FONT]
However, when second userform is loaded, the change event was not working.
Can anybody tell me why or how to fix it? Thanks in advance.
Code for textbox on 1st userform:
Code for texitbox on 2nd form. It' similar to 1st form.
[/I][/I][/I][/I][/I][/I]
However, when second userform is loaded, the change event was not working.
Can anybody tell me why or how to fix it? Thanks in advance.
Code for textbox on 1st userform:
Code:
[FONT=Trebuchet MS]Private Sub TextBox1_Change()[/FONT]
[I][FONT=Trebuchet MS]If (Right(UserForm1.TextBox1, 1) = "E") Then[/FONT]
[I][FONT=Trebuchet MS]Unload Me[/FONT]
[I][FONT=Trebuchet MS]Load UserForm2[/FONT]
[I][FONT=Trebuchet MS]UserForm2.Show[/FONT]
[I][FONT=Trebuchet MS]End If[/FONT]
[I][FONT=Trebuchet MS]End Sub[/FONT]
Code for texitbox on 2nd form. It' similar to 1st form.
Code:
[I][FONT=Trebuchet MS]Private Sub TextBox1_Change()[/FONT]
[I][FONT=Trebuchet MS]If (Right(UserForm2.TextBox1, 1) = "E") Then[/FONT]
[I][FONT=Trebuchet MS]Unload Me[/FONT]
[I][FONT=Trebuchet MS]Load UserForm1[/FONT]
[I][FONT=Trebuchet MS]UserForm1.Show[/FONT]
[I][FONT=Trebuchet MS]End If[/FONT]
[I][FONT=Trebuchet MS]End Sub[/FONT][/I][/I][/I][/I][/I][/I][/I]