Ich lese aus einer Tabelle Daten in eine UF ein, beim Datum wird der Wert dann aber ohne Punkte in die Textbox geschrieben, kann mir jemand helfen?
Gruß und Dank
Holger
Private Sub ComboBox1_Change()
On Error Resume Next
Application.ScreenUpdating = False
TextBox2 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 2))
TextBox3 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 5))
TextBox4 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 6))
TextBox5 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 7))
TextBox6 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 8))
TextBox7 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 9))
TextBox8 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 10))
TextBox9 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 11))
TextBox10 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 14))
TextBox11 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 15))
TextBox13 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 18))
TextBox14 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 19))
TextBox21 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 12))
TextBox22 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 16))
ComboBox2 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 4))
ComboBox3 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 20))
ComboBox4 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 13))
ComboBox5 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 17))
ComboBox6 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 3))
ComboBox7 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 21))
End Sub
in der Textbox3 steht das Geburtsdatum, wass im sheet auch als Datum formatiert ist. Alles funtzt auch prima, nur das GebDatum wird ohne Punkte angezeigt. Hast Du hierfür ne Lösung?
Mit der UF kann ich eingegebene Daten ändern und zurück speichern.
Gruß und Dank
Holger
TextBox2 = Format(Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 2))
nicht einfach
TextBox2 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 2)
?
Das muesste meines Erachtens voellig ausreichen. Evtl. kannst Du noch ".text" an den Sheets-Begriff anhaengen, aber das sollte es dann auch gewesen sein...
Gruss
Rainer
TextBox2 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 2).Text
TextBox3 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 5).Text
TextBox4 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 6).Text
TextBox5 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 7).Text
TextBox6 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 8).Text
TextBox7 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 9).Text
TextBox8 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 10).Text
TextBox9 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 11).Text
TextBox10 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 14).Text
TextBox11 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 15).Text
TextBox13 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 18).Text
TextBox14 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 19).Text
TextBox21 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 12).Text
TextBox22 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 16).Text
ComboBox2 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 4).Text
ComboBox3 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 20).Text
ComboBox4 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 13).Text
ComboBox5 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 17).Text
ComboBox6 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 3).Text
ComboBox7 = Sheets("Bew_Dat").Cells(ComboBox1.ListIndex + 2, 21).Text