Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Left(TextBox1.Text, 2) = "P-" Then MsgBox "Der er P- i starten" Else MsgBox "Der er IKKE P- i starten" End If End Sub
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 13 Then If Left(TextBox1.Text, 2) = "P-" Then MsgBox "Der er P- i starten" Else MsgBox "Der er IKKE P- i starten" End If End If
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.