Ich habe eine UF mit vielen TextBoxen. Ich möchte, wenn Textbox1 einen Wert hat der mit "HR" anfängt, dass die Hintergrundfarbe gelb wird.
Wer weiss wie es geht?
Gruß
Martin
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Left(UserForm1.TextBox1.Value, 2) = "HR" Then
UserForm1.TextBox1.BackColor = &HFFFF&
End If
End Sub
Gruß Matthias
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1 Like "HR*" Then
TextBox1.BackColor = &HFFFF&
Else
TextBox1.BackColor = &H80000005
End If
End Sub
mfg Kurt