M
mac
Hello,
I have a macro (see below) and it works great. The only problem I am having
is that I want to be able to see in locked cells, and the macro only lets me
go into unlocked cells. I do not want to change the locked cells, just be
able to see formula and where it comes from. Could anyone tell me what I am
doing wrong with this macro?? Any help is greatly appreciated.
For Each Sheet In Worksheets
Range("A1").Select
If Sheet.ProtectContents = False Then
Sheet.Protect Password:="2568", _
DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True
EnableSelection = xlUnlockedCells
End If
Next Sheet
Range("A1").Select
' ActiveSheet.UnProtect Password:="2000"
MsgBox "All sheets are now protected!"
End Sub
I have a macro (see below) and it works great. The only problem I am having
is that I want to be able to see in locked cells, and the macro only lets me
go into unlocked cells. I do not want to change the locked cells, just be
able to see formula and where it comes from. Could anyone tell me what I am
doing wrong with this macro?? Any help is greatly appreciated.
For Each Sheet In Worksheets
Range("A1").Select
If Sheet.ProtectContents = False Then
Sheet.Protect Password:="2568", _
DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True
EnableSelection = xlUnlockedCells
End If
Next Sheet
Range("A1").Select
' ActiveSheet.UnProtect Password:="2000"
MsgBox "All sheets are now protected!"
End Sub