Userform using text boxes
-
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.
-
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.
hmm.. sry to get ur hopes up. u prolly think iv got a solution, which i dont. ;P i dont know anything about these userforms your talking about. iv worked with vb6 windows apps, but not in vb.net. only console apps. i am prolly way off, but, couldnt u just make a hidden text box or label to store the previous forms' value? ------------------------ Jordan. III