Formatänderung
26.06.2005 13:53:17
Marco
ich steuere in der userform in den jeweiligen textboxen1-6 bzw. 14-19 per update... untenstehenden code an, sprich ich will die zahlen in währung umwandeln.
seltsamerweise ändert er jeweils immer nur die betreffende textbox + die nächstgelegene an und ändert dort das format.
z.b. textbox14 wird geändert = währungsformat textbox 14,15 vorhanden.
was mache ich falsch ?
vielen dank
Dim vx As Integer
For vx = 1 To 6
If Len(KalkBahn.Controls("TextBox" & vx).Text) 0 Then
If Not IsNumeric(KalkBahn.Controls("TextBox" & vx).Text) Then
MsgBox "Sie müssen einen numerischen Wert eingeben!"
Cancel = True
Exit Sub
End If
KalkBahn.Controls("TextBox" & vx).Text = FormatCurrency(KalkBahn.Controls("TextBox" & vx).Text)
End If
Next vx
Dim ux As Integer
For ux = 14 To 19
If Len(KalkBahn.Controls("TextBox" & ux).Text) 0 Then
If Not IsNumeric(KalkBahn.Controls("TextBox" & ux).Text) Then
MsgBox "Sie müssen einen numerischen Wert eingeben!"
Cancel = True
Exit Sub
End If
KalkBahn.Controls("TextBox" & ux).Text = FormatCurrency(KalkBahn.Controls("TextBox" & ux).Text)
End If
Next ux