Hello everybody,
I have a UserForm1 in which I check a value in a text box.
If there is a mismatch, UserForm2 opens.
Now, when confirming UserForm2 (CommandButton1_Click), I want the UserFom1 text box to empty and, at the same time, to be activated again after closing UserForm2 for further input.
I managed to do that with the empty, unfortunately not the activation (set.Focus ??) for further input.
Maybe someone here has a tip?
Code of UserForm2_
Private Sub CommandButton1_Click ()
Dim c As Control
For Each c In UserForm1.Controls
If TypeOf c Is MSForms.TextBox Then
c = ""
End If
Next
Unload UserForm2
End Sub
greeting
Bernd
I have a UserForm1 in which I check a value in a text box.
If there is a mismatch, UserForm2 opens.
Now, when confirming UserForm2 (CommandButton1_Click), I want the UserFom1 text box to empty and, at the same time, to be activated again after closing UserForm2 for further input.
I managed to do that with the empty, unfortunately not the activation (set.Focus ??) for further input.
Maybe someone here has a tip?
Code of UserForm2_
Private Sub CommandButton1_Click ()
Dim c As Control
For Each c In UserForm1.Controls
If TypeOf c Is MSForms.TextBox Then
c = ""
End If
Next
Unload UserForm2
End Sub
greeting
Bernd