Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Zahlenformat in Textbox

Forumthread: Zahlenformat in Textbox

Zahlenformat in Textbox
20.06.2006 17:29:06
Klaus
Sehr geehrte EX-Gurus!
Ich hab in einer UF folgende Textbox angelegt:

Private Sub txtVonBr1_Change()
txtVonBr1.Value = Format(txtVonBr1.Value, "##.#0")
End Sub

Wenn ich nun 2 eingebe, steht noch bevor ich mit ENTER bestätigen kann 2,00 in der Textbox. Den Wert 2,5 kann ich gar nicht eintragen, den dies führt zu 2,00,5.
Was mach ich falsch
Danke Klaus
Anzeige

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Zahlenformat in Textbox
20.06.2006 17:32:48
Thorsten
Hallo Klaus,
Probier mal das hier:

Private Sub txtVonBr1_Change()
txtVonBr1.Value = Format(txtVonBr1.Value, "##.#0,0")
End Sub

Gruß Thorsten
AW: Zahlenformat in Textbox
20.06.2006 17:33:00
u_
Hallo,
nimm das exit-Ereignis.

Private Sub txtVonBr1_exit()
txtVonBr1.Value = Format(txtVonBr1.Value, "##.#0")
End Sub

Gruß
Geist ist geil!
(Dies ist ein allgemeines Statement und nicht an bestimmte Personen gerichtet.)
Anzeige
AW: Zahlenformat in Textbox
20.06.2006 17:34:04
Hoffi
Hallo Klaus,
Pack den Code ins Exit-Ereignis:

Private Sub txtVonBr1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtVonBr1.Value = Format(txtVonBr1.Value, "##.#0")
End Sub

Grüße
Hoffi
P.S. Rückmeldung wäre nett...
Ich danke euch
20.06.2006 17:38:42
Klaus
xxx

Forumthreads zu verwandten Themen

Anzeige
Anzeige
Anzeige