Sub test()ThisWorkbook.Protect "123"ThisWorkbook.Unprotect "123"Sheet1.Protect "123"Sheet1.Unprotect "123"End Sub