Jordan
Jordan

Reputation: 697

Protected sheets - VBA

I have used the following function to protect a sheet

Sub sbProtectSheet()

    ActiveSheet.Protect "password", True, True

End Sub


Sub sbUnProtectSheet()

  ActiveSheet.Unprotect "password"
End Sub

There is a chart on this sheet that I want to unprotect while the rest of the sheet stays protected. I only seem to find that you can unlook a specfic range and nothing else.

Upvotes: 1

Views: 110

Answers (1)

Vityata
Vityata

Reputation: 43595

This is a macro that I have recorded just to see how do you get the Drawing Object available for selection:

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= True

I am pretty sure that you would be able to fix it into your code.

Upvotes: 1

Related Questions