meine Userform besteht aus Textboxen und Commandbuttons (na, ja). Kann ich feststellen, in welcher Textbox ich war bevor ich ein Commandbutton anklicke?
Wenn das geht, wie macht man das?
Vielen Dank für eine Antwort.
Mit freundlichen grüßen
Albrecht
Private Sub CommandButton1_Click()
MsgBox CommandButton1.Tag
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
CommandButton1.Tag = "TextBox1"
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
CommandButton1.Tag = "TextBox2"
End Sub
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
CommandButton1.Tag = "TextBox3"
End Sub
Gruß Uwe