Nächstes Problem; wenn alle 4 Formulare ausgefüllt sind werden per Knopdruck alle eingaben in die Excel eingetragen, das Funktioniert wenn ich das Makro mit geöffneter Excel starte einwandfrei, allerding mit diesem Code leider nicht...
Code:
Option Explicit
Private Sub Bestätigen_Click()
'erste Freie Zeile ausfindig machen
Dim Last As Integer
Worksheets("Datenbank").Activate
Last = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row + 1
'Userform1
Cells(Last, 1).Value = UserForm1.TextBox_NameVorname
Cells(Last, 3).Value = UserForm1.TextBox_Sachbearbeiter
Cells(Last, 5).Value = UserForm1.TextBox_Objektname
Cells(Last, 8).Value = UserForm1.TextBox_Bauherr
Cells(Last, 9).Value = UserForm1.TextBox_BauleitungGU
Cells(Last, 10).Value = UserForm1.TextBox_Architekt
Cells(Last, 11).Value = UserForm1.TextBox_Ingenieur
Cells(Last, 13).Value = UserForm1.TextBox_Spetzielles
If UserForm1.CheckBox_WandSchalung = True Then Cells(Last, 14).Value = "R"
If UserForm1.CheckBox_Deckenschalung = True Then Cells(Last, 15).Value = "R"
If UserForm1.CheckBox_Armierung = True Then Cells(Last, 16).Value = "R"
If UserForm1.CheckBox_Mauerwerk = True Then Cells(Last, 17).Value = "R"
If UserForm1.CheckBox_FBFolie = True Then Cells(Last, 18).Value = "R"
If UserForm1.CheckBox_Dämmung = True Then Cells(Last, 19).Value = "R"
If UserForm1.CheckBox_Elemente = True Then Cells(Last, 20).Value = "R"
If UserForm1.CheckBox_KanalisationWerkleitungen = True Then Cells(Last, 21).Value = "R"
Cells(Last, 2).Value = UserForm1.ComboBox_Abteilung1
Cells(Last, 4).Value = UserForm1.ComboBox_Abteilung2
Cells(Last, 6).Value = UserForm1.ComboBox_Ort
Cells(Last, 7).Value = UserForm1.ComboBox_PLZ
Cells(Last, 12).Value = UserForm1.ComboBox_ProjektStatus
Cells(Last, 22).Value = UserForm1.DTPicker_Auftragserteilung
Cells(Last, 23).Value = UserForm1.DTPicker_StartFKOMP
Cells(Last, 24).Value = UserForm1.DTPicker_Abgabedatum
'Userform2
Cells(Last, 34).Value = UserForm2.TextBox_Summe
Cells(Last, 35).Value = UserForm2.TextBox_KalkStd
Cells(Last, 46).Value = UserForm2.TextBox_FerienSommer
Cells(Last, 47).Value = UserForm2.TextBox_FerienWinter
Cells(Last, 52).Value = UserForm2.TextBox_Sonstiges
If UserForm2.CheckBox_Bauprogramm = True Then Cells(Last, 25).Value = "R"
If UserForm2.CheckBox_Grobprogramm = True Then Cells(Last, 26).Value = "R"
If UserForm2.CheckBox_Etappierung = True Then Cells(Last, 27).Value = "R"
If UserForm2.CheckBox_InstallationLogistik = True Then Cells(Last, 28).Value = "R"
If UserForm2.CheckBox_BauablaufVideo = True Then Cells(Last, 29).Value = "R"
If UserForm2.CheckBox_Mengenüberprüfung = True Then Cells(Last, 30).Value = "R"
If UserForm2.CheckBox_DefinitionPauschale = True Then Cells(Last, 31).Value = "R"
If UserForm2.CheckBox_NPKNr = True Then Cells(Last, 32).Value = "R"
If UserForm2.CheckBox_Kalkulation = True Then Cells(Last, 33).Value = "R"
If UserForm2.CheckBox_Potential = True Then Cells(Last, 49).Value = "R"
If UserForm2.CheckBox_AGBs = True Then Cells(Last, 50).Value = "R"
If UserForm2.CheckBox_Ergänzung = True Then Cells(Last, 51).Value = "R"
If UserForm2.CheckBox_Kranoptik = True Then Cells(Last, 36).Value = "R"
If UserForm2.CheckBox_Personalplanung = True Then Cells(Last, 37).Value = "R"
If UserForm2.CheckBox_LeistungsabhängigeKosten = True Then Cells(Last, 38).Value = "R"
If UserForm2.CheckBox_SchalungBewehrungBeton = True Then Cells(Last, 39).Value = "R"
If UserForm2.CheckBox_Mauerwerk = True Then Cells(Last, 40).Value = "R"
If UserForm2.CheckBox_Planlieferprogramm = True Then Cells(Last, 41).Value = "R"
If UserForm2.CheckBox_Elementlieferprogramm = True Then Cells(Last, 42).Value = "R"
If UserForm2.CheckBox_Zahlungsplan = True Then Cells(Last, 43).Value = "R"
If UserForm2.CheckBox_TerminplanBL = True Then Cells(Last, 48).Value = "R"
Cells(Last, 44).Value = UserForm2.DTPicker_RohbauStart
Cells(Last, 45).Value = UserForm2.DTPicker_RohbauEnde
'Userform3
If Userform3.CheckBox_BimModell = True Then Cells(Last, 53).Value = "R"
If Userform3.CheckBox_Architektenpläne = True Then Cells(Last, 54).Value = "R"
If Userform3.CheckBox_Ingenieurpläne = True Then Cells(Last, 55).Value = "R"
If Userform3.CheckBox_Etappierungspläne = True Then Cells(Last, 56).Value = "R"
If Userform3.CheckBox_Aushubplan = True Then Cells(Last, 57).Value = "R"
If Userform3.CheckBox_Kanalisation = True Then Cells(Last, 58).Value = "R"
If Userform3.CheckBox_Umgebungsplan = True Then Cells(Last, 59).Value = "R"
If Userform3.CheckBox_InstallationLogistik = True Then Cells(Last, 60).Value = "R"
If Userform3.CheckBox_MateriallisteStückliste = True Then Cells(Last, 61).Value = "R"
If Userform3.CheckBox_LeistungverzeichnisDevis = True Then Cells(Last, 62).Value = "R"
If Userform3.CheckBox_Werkvertrag = True Then Cells(Last, 63).Value = "R"
If Userform3.CheckBox_Grobterminplan = True Then Cells(Last, 64).Value = "R"
If Userform3.CheckBox_Bauablauf = True Then Cells(Last, 65).Value = "R"
If Userform3.CheckBox_BesondereBestimmungen = True Then Cells(Last, 66).Value = "R"
If Userform3.CheckBox_AGBs = True Then Cells(Last, 67).Value = "R"
If Userform3.CheckBox_Auflagen = True Then Cells(Last, 68).Value = "R"
If Userform3.CheckBox_GeologischesGutachten = True Then Cells(Last, 69).Value = "R"
If Userform3.CheckBox_Nutzungsvereinbarung = True Then Cells(Last, 70).Value = "R"
If Userform3.CheckBox_Kontrollplan = True Then Cells(Last, 71).Value = "R"
If Userform3.CheckBox_ARGLogo = True Then Cells(Last, 72).Value = "R"
UserForm4.Hide
End Sub
Private Sub Zurück_Click()
UserForm4.Hide
Userform3.Show
End Sub