Exit-Ereignbis 2-mal?
ing.grohn
die folgende EXIT Procedur wird zweimal (im Fehlerfall, Name vorname nicht eingetragen) durchlaufen!
Warum?
Private Sub TextBox27_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim Hilf As String
TextBox27.BackColor = alteFarbe
If InStr(TextBox27.Text, "/") Then
TextBox27.Text = Format(Split(TextBox27.Text, "/")(0), "000") & "/" _
& Format(Split(TextBox27.Text, "/")(1), "00")
End If
If ComboBox2.Value = "Mandant" Then
MsgBox Testaufruf
Testaufruf = Testaufruf + 1
If Range("X" & ErmZeile(ActiveCell.Address)).Value = "" Then
Hilf = TextBox3.Value
If LTrim(TextBox3.Value) = "" Then
Hilf = TextBox2.Value
End If
If LTrim(Hilf) = "" Then
MsgBox "Es wurden weder ein Nachname noch ein Vorname angegeben!"
Uf_Adressen.TextBox2.SetFocus
Else
Call MandantenVerzeichnisTesten(Hilf & "_" & TextBox27.Value, _
ErmZeile(ActiveCell.Address))
End If
End If
End If
End Sub
Vielen Dank für Eure Hilfe
Mit freundlichen Grüßen
Albrecht