ich entbeine gleich meinen Rechner und schmücke damit den Tannenbaum.
Habe eine tolle Eingabemaske hier aus dem Forum. Läuft wunderbar. In Textbox3 trage ich einen -Betrag ein. Die entsprechende Formatierung habe ich, dank der Recherche, in den Code einfügen können und wird auch richtig angezeigt. Aber wieso sagt mir Excel immer noch, dass die Zahl als Text formatiert ist?
Hat die eingefügte Codezeile nichts mit Zahl ansich zu tun?
Was ist da los?
<pre>
Private Sub CommandButton2_Click()
Dim xZeile As Long
TextBox3.Value = Format(TextBox3.Value, "#,##0.00 ") 'diese Zeile habe ich aus der Recherche
If TextBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ComboBox1.ListIndex + 1
End If
Cells(xZeile, 1) = TextBox1
Cells(xZeile, 2) = TextBox2
Cells(xZeile, 3) = TextBox3
Cells(xZeile, 4) = TextBox4
Cells(xZeile, 5) = TextBox5
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
End Sub</pre>
Gruß
Thorsten