Ich bekomme den Schutz in meinem Code nicht aufgehoben. Kann mir einer schreiben warum.
Die MSG-Boxen werden angezeigt aber es haut nicht hin
Private Sub CommandButton1_Click()
Dim LRow As Long
If ComboBox1 "" Then
'Textbox angeben wo die Tabelle drin steht
With Workbooks("Recherche_Ergebnisse.xls").Sheets(CStr(ComboBox1))
LRow = .Cells(.Rows.Count, 1).End(xlUp).Row 'letzte Zeile?
LRow = LRow + 1 'nächste leere Zeile
ActiveSheet.Unprotect "Test"
MsgBox "Blattschutz ist aufgehoben!"
.Cells(LRow, 1) = (TextBox11) 'Lfd.Nr.
.Cells(LRow, 3) = (TextBox1) 'Arbeitgeber
.Cells(LRow, 5) = (TextBox2) 'PLZ
.Cells(LRow, 6) = (TextBox3) 'Ort
.Cells(LRow, 4) = (TextBox4) 'Straße
.Cells(LRow, 2) = (TextBox4) 'Erstellungsdatum
.Cells(LRow, 7) = (TextBox6) 'Telefon
.Cells(LRow, 8) = (TextBox7) 'Ansprechpartner
.Cells(LRow, 9) = (TextBox8) 'Stellenbeschreibung
.Cells(LRow, 11) = (ComboBox2) 'Stellenherkunft
.Cells(LRow, 10) = (TextBox9) 'Ausgabedatum
.Cells(LRow, 12) = (TextBox10) 'Bemerkungen
ActiveSheet.Protect "Test"
MsgBox "Blattschutz ist gesetzt!"
End With
den Rest des Codes habe ich mir geschenkt hier zu posten.
Weiß jemand Rat?
Gruss
Stefan