beim verlassen eines Textfeldes, das sich auf einer Userform befindet, soll die Zahl, die man dort eingegeben hat auf zwei Nachkommastellen und dem 1000er Punkt formatiert werden.
Mei Code funktioniert nicht.
Wie ist es richtig?
Private Sub txtBetrag_Gesellschaft_Konto_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Val(txtBetrag_Gesellschaft_Konto.Text) "" Then
If Not IsNumeric(txtBetrag_Gesellschaft_Konto.Text) = True Then
MsgBox "Geben Sie eine positive Zahl ein"
txtBetrag_Gesellschaft_Konto.Text = ""
Cancel = True
End If
End If
Me.txtBetrag_Gesellschaft_Konto = Format("#.###,##")
End Sub
Grüße aus Berlin