Hi Werner,
habe es geändert, jedoch zeigt es immer noch Fehler beim Kompilieren, Variable nicht deifiniert an.
Was mache ich falsch?
Private Sub BeinaheunfallVerteilen_Click()
With Worksheets("Beinaheunfälle")
.Range("E3").Value = Me.ComboBox1.Value 'Werk
.Range("A5") = TextBoxBeinaheunfallVorname 'Vorname
.Range("E5") = TextBoxBeinaheunfallNachname 'Nachname
.Range("A7") = TextBoxBeinaheunfallMaschine 'Maschine
.Range("E7") = TextBoxBeinaheunfallAbteilung 'Abteilung
.Range("A10") = TextBoxBeinaheunfallUnfallhergang 'Unfallhergang
.Cells(.Cells(.Rows.Count, "A").End(x1Up).Offset(1).Row, "A") = TextBoxBeinaheUnfallDatum 'erste freie Zelle in Spalte A "Datum"
.Cells(.Cells(.Rows.Count, "B").End(x1Up).Offset(1).Row, "B") = ComboBox1 'erste freie Zelle in Spalte B "Werk"
.Cells(.Cells(.Rows.Count, "C").End(x1Up).Offset(1).Row, "C") = TextBoxBeinaheunfallVorname 'erste freie Zelle in Spalte C "Vorname"
.Cells(.Cells(.Rows.Count, "D").End(x1Up).Offset(1).Row, "D") = TextBoxBeinaheunfallNachname 'erste freie Zelle in Spalte D "Nachname"
.Cells(.Cells(.Rows.Count, "E").End(x1Up).Offset(1).Row, "E") = TextBoxBeinaheunfallMaschine 'erste freie Zelle in Spalte E "Maschine"
.Cells(.Cells(.Rows.Count, "F").End(x1Up).Offset(1).Row, "F") = TextBoxBeinaheunfallAbteilung 'erste freie Zelle in Spalte F "Abteilung"
.Cells(.Cells(.Rows.Count, "G").End(x1Up).Offset(1).Row, "G") = TextBoxBeinaheunfallUnfallhergang 'erste freie Zelle in Spalte G "Unfallhergang"
End With
|