This is my first time using a forum. I hope i will be able to describe my problem.
I'm trying to create a user form with a textbox, ok button and cancel button. I would like to run my code when the ok button or enter is used in the textbox, then close the form.
I would like the cancel to work:
1. with nothing in the input box
2. after entering some text
I have tried using the afterupdate, beforeupdate and exit events. When something has been entered these procedures seem to run before my cancel procedure.
My problem seems to be that when I hit the cancel button after I enter text in the txtbox - the txtbox procedure must run first.
Also new to Vba.
Sorry to be so wordy.
Thanks
I'm trying to create a user form with a textbox, ok button and cancel button. I would like to run my code when the ok button or enter is used in the textbox, then close the form.
I would like the cancel to work:
1. with nothing in the input box
2. after entering some text
I have tried using the afterupdate, beforeupdate and exit events. When something has been entered these procedures seem to run before my cancel procedure.
My problem seems to be that when I hit the cancel button after I enter text in the txtbox - the txtbox procedure must run first.
Also new to Vba.
Sorry to be so wordy.
Thanks