Hi I have these 2 codes to protect and then unprotect the workbook.
The first time that the 'Protect' code runs there is a weird extra cell box like where the cursor is. When I run the 'Unprotect' and then the 'Protect' again it is normal showing only the place where the cursor is (K28).
Does anyone know why this happens and perhaps how to fix?
Thank you for your help
Sub ProtectWorkbook()
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
wsheet.Protect Password:="password"
Next wsheet
Range("K28").Select
End Sub
Sub UnProtectWorkbook()
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
wsheet.Unprotect Password:="password"
Next wsheet
End Sub
Bookmarks