CookieMonster76
Board Regular
- Joined
- Apr 30, 2015
- Messages
- 201
Hi
I want to protect a worksheet and allow the end user too use grouping, for which I have the following:
Private Sub Workbook_Open()
For Each wks In ThisWorkbook.Worksheets(Array("Summary I&E", "Balance Sheet"))
With wks
.Unprotect "Ronald"
.EnableOutlining = True
.Protect "Ronald", contents:=True, userInterfaceOnly:=True
End With
Next
End Sub
However, it doesn't seem to apply a password to protect the worksheet - The user can just click on unprotect sheet, and it unprotects it without a prompt for a password.
Is there a way to rectify this?
Thanks
Paul
I want to protect a worksheet and allow the end user too use grouping, for which I have the following:
Private Sub Workbook_Open()
For Each wks In ThisWorkbook.Worksheets(Array("Summary I&E", "Balance Sheet"))
With wks
.Unprotect "Ronald"
.EnableOutlining = True
.Protect "Ronald", contents:=True, userInterfaceOnly:=True
End With
Next
End Sub
However, it doesn't seem to apply a password to protect the worksheet - The user can just click on unprotect sheet, and it unprotects it without a prompt for a password.
Is there a way to rectify this?
Thanks
Paul