Can anyone tell me how text can re-appear in the text box that was previously entered when the userform is re-opened. The way my code is written now. When you re-open the userform the text boxes are automatically cleared for new text to be entered. Please look at this code below: Private Sub cmdOK Click() If textbox1.TextLength > 0 Then ActiveSheet.Cells(5, 2).Value = textbox1.Text Unload UserForm1 Else MsgBox "You are required to enter text. Please enter it now.", vbCritical End If End Sub If you have any code examples, please share them with me. Thanks. I would really appreciate the help.
E
EZ V
@EZ V
Posts
-
Userform using text boxes -
Excel Wksheet Using Visual BasicTO: RageInTheMachine9532 Thank you so much for your input. It worked. Now I can continue on with my project for work.:laugh:
-
Excel Wksheet Using Visual BasicHey Everyone! I'm a rookie at this stuff so I'm seeking help. I've built buttons and huge macros in my excel spreadsheets and I know how to assign buttons to my macros. Here is where I'm stuck. I just learned how to build userforms with textboxes, buttons, and macros to activate userform. I just can't figure out how to open my userforms in my worksheet without going into the visual basic editor. I would like to learn how to program a button to open my userform in my worksheet. Can anyone please help me. If possible I would like to see a sample of codes. Thank you so much..... :confused: