mit nachstehendem Code ändere ich Werte markiert aus Listbox in Textboxes.
'Daten übernehmen
Private Sub CommandButton2_Click()
Dim xZeile As Long
If TextBox1 = "" Then Exit Sub
If ListBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ListBox1.ListIndex + 1
End If
Cells(xZeile, 1) = TextBox1
Cells(xZeile, 2) = TextBox2
Cells(xZeile, 3) = TextBox3
Cells(xZeile, 4) = TextBox4
Cells(xZeile, 5) = CCur(UFPersonal_auswählen.TextBox5)
Cells(xZeile, 6) = CCur(UFPersonal_auswählen.TextBox6)
'Cells(xZeile, 7).Value = TextBox7.Value 'darf nicht geändert werden wegen Formel
Cells(xZeile, 8) = TextBox8
Cells(xZeile, 9) = TextBox9
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
UserForm_Initialize
End Sub
Bei Spalte 5 und 6 kommt Fehlermeldung Laufzeitfehler 13 Typenunverträglich.Ich möchte erreichen, dass Text als Zahl übergeben wird.
Die Spalte 5 und 6 ist mit Währung ,00 formatiert.
Wenn ich CCur(TextBox5) eingebe erfolgt ebenfalls Fehlermeldung.
Was kann ich bitte ändern, damit es funktioniert.
Besten Dank.
Gruss
Peter