Hello Will_P,
Welcome to the Forum!
I have provide you with 2 examples. The first assumes you have 10 TextBoxes total on the UserForm, and the second clears only 5 of the TextBoxes by name. I did not want to create 10 different TextBox names for an example.
Whichever macro you use, add the code the UserForm in the General procedure section at the top of the UserForm.
Example 1
Example 2![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
It's saying that Ctrl is not an object.
Last edited by arlu1201; 04-17-2013 at 01:40 AM. Reason: Do not quote whole posts.
Hello Will_P,
Can you post a copy of the workbook? Tell me which 10 TextBoxes needed to be checked and I will add the needed code.
GMD Request.xlsm
I know I have a lot of messy macros on this workbook. Please forgive this great dishonor.
Hello Will_P,
Here is the revised UserForm code...
![]()
Please Login or Register to view this content.
Will having
above![]()
Please Login or Register to view this content.
mess anything up?![]()
Please Login or Register to view this content.
Hello Will,
It is placed at the top (General procedures) so all Sub and Function routines on the UserForm can access it.
Ah, cool. That's another item on the list of things I learned today.
For the sake of myself and others; how do I make it not close and restart excel, if I press 'Submit' without filling out all the fields?
Hello Will,
Sorry, I din't catch that when I was fixing the macro. This should take care of the problem...
![]()
Please Login or Register to view this content.
What do you think about this as an alternative? or something like this.
I want it to take you back to the form until you have filled it out or exited the form, at which point I'd want it to close the workbook. Also, if you submit with all the fields filled out, I want it to save and close. But I'd like a code word to access the data in the workbook. like if you put a codeword in one of the fields.![]()
Please Login or Register to view this content.
Last edited by Will_P; 04-17-2013 at 12:20 PM.
Hello Will,
I am not sure I understand what you want to do. What should happen if Status is an empty string?
I solved it myself.
![]()
Please Login or Register to view this content.
Last edited by Will_P; 04-17-2013 at 12:20 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks