ich habe ein Prüfprotokoll erstellt, indem ich per Eingabemaske die Kopfdaten in die jeweiligen Blätter schreiben kann! In dem Blatt sind alle Blätter variabel (sind auswählbar), ausser das Blatt "Datenblatt"
Mein Problem jetzt ist, dass die Daten nicht in alle Blätter übertragen werden, sondern nur in das "Datenblatt"! Da alle Blätter aktiviert werden müssen habe ich auch ein Makro erstellt, welches alle Blätter aktiviert, selbst dann funktioniert es nicht!
Vielleicht hat jemand ne Idee, oder sieht meinen Fehler!
Mein Makro:
Private Sub cmdOK_Click()
Dim i As Integer
For i = 1 To Worksheets.Count
If Worksheets(i).Name = "Datenblatt" Then
'If Sheets("Datenblatt").Select Then
With Sheets("Datenblatt")
Cells(3, 3).Value = txtAuftragsnr.Value
Cells(4, 3).Value = txtAuftraggeber.Value
Cells(6, 3).Value = txtKunde.Value
Cells(7, 3).Value = txtProjektnr.Value
Cells(8, 3).Value = txtFiltertyp.Value
Cells(9, 3).Value = txtHersteller.Value
Cells(10, 3).Value = txtZeichnungsnr.Value
Cells(11, 3).Value = ComboBox4.Value + " " + ComboBox5.Value + " " + ComboBox6.Value
Cells(12, 3).Value = ComboBox7.Value + " " + ComboBox8.Value + " " + ComboBox9.Value
If ComboBox1 = "" And ComboBox2 = "" And ComboBox3 = "" Then
MsgBox ("Bitte Prüfdatum eingeben!!")
Else
Cells(5, 3).Value = ComboBox1.Value + " " + ComboBox2.Value + " " + ComboBox3.Value
End If
If ComboBox10 = "" And ComboBox11 = "" And ComboBox12 = "" Then
MsgBox ("Bitte Termin eingeben!!")
Else
Cells(7, 7).Value = ComboBox10.Value + " " + ComboBox11.Value + " " + ComboBox12.Value
End If
End If
If Worksheets(i).Name = "Reinheit ISO" Then
'If Sheets("Reinheit ISO") Then
With Sheets("Reinheit ISO")
Cells(12, 2).Value = txtAuftragsnr.Value
Cells(13, 2).Value = txtAuftraggeber.Value
Cells(14, 2).Value = ComboBox1.Value + " " + ComboBox2.Value + " " + ComboBox3.Value
Cells(15, 2).Value = txtKunde.Value
Cells(16, 2).Value = txtProjektnr.Value
Cells(17, 2).Value = txtFiltertyp.Value
Cells(18, 2).Value = txtHersteller.Value
Cells(19, 2).Value = txtZeichnungsnr.Value
Cells(20, 2).Value = ComboBox4.Value + " " + ComboBox5.Value + " " + ComboBox6.Value
Cells(21, 2).Value = ComboBox7.Value + " " + ComboBox8.Value + " " + ComboBox9.Value
'Cells(23, 2).Value = txtPrüfnorm.Value
End With
Else
End If
Exit For
'End If
End Sub
Danke im Voraus
Chris