Hallo,
bij onderstaande krijg ik een foitmelding in VBA "Object required"?
Sub CopyStuff()
MsgBox "Is alles correct ingevuld?"
Worksheets("Historie").Unprotect Password:="1"
Range("B4:E62").Copy
Sheets("Historie").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Worksheets("Blad1").Range("D4:E62").ClearContents
Worksheets("Historie").Protect Password:="1", AllowFiltering:=True, AllowUsingPivotTables:=True
Worksheet.EnableSelection = xlUnlockedCells
End Sub
Kan iemand mij helpen wat er fout is?
bij onderstaande krijg ik een foitmelding in VBA "Object required"?
Sub CopyStuff()
MsgBox "Is alles correct ingevuld?"
Worksheets("Historie").Unprotect Password:="1"
Range("B4:E62").Copy
Sheets("Historie").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Worksheets("Blad1").Range("D4:E62").ClearContents
Worksheets("Historie").Protect Password:="1", AllowFiltering:=True, AllowUsingPivotTables:=True
Worksheet.EnableSelection = xlUnlockedCells
End Sub
Kan iemand mij helpen wat er fout is?