Hi all, i have a procedure which unloads a userform. When this userform is loaded, one of the textboxes are setfocused on (textbox1.setfocus).
This textbox has validation codes in its BeforeUpdate event. If wrong text is entered, there will be a prompt.
In the procedure i have the following codes.
.
.
.
Application.EnableEvents = False
Unload frm_Userform
Application.EnableEvents = True
.
.
.
Thing is, unloading the userform still triggers the BeforeUpdate event of the textbox. Thus, if there is wrong text, there will be a prompt. And i don't want that prompt to occur in this procedure. Any ideas?
Excel 2003
Thanks
Shie Boon
This textbox has validation codes in its BeforeUpdate event. If wrong text is entered, there will be a prompt.
In the procedure i have the following codes.
.
.
.
Application.EnableEvents = False
Unload frm_Userform
Application.EnableEvents = True
.
.
.
Thing is, unloading the userform still triggers the BeforeUpdate event of the textbox. Thus, if there is wrong text, there will be a prompt. And i don't want that prompt to occur in this procedure. Any ideas?
Excel 2003
Thanks
Shie Boon