Kelvin Stott
Active Member
- Joined
- Oct 26, 2010
- Messages
- 338
Hi,
Thanks for all the help so far! I've now completed my model, but have encountered the following security issue when I try to protect my sheet:
I have added the following code to enable grouping/ungrouping on my protected sheet, but the VBA interface and code can still be opened (and even changed!) while the sheet is protected, so my supposedly secret password becomes visible, which defeats the whole point of protecting it!
So: How can I hide and disable the VBA interface so that none of the macros can be opened or edited while the sheet is protected?
Thanks for any help/guidance on this.
Thanks for all the help so far! I've now completed my model, but have encountered the following security issue when I try to protect my sheet:
I have added the following code to enable grouping/ungrouping on my protected sheet, but the VBA interface and code can still be opened (and even changed!) while the sheet is protected, so my supposedly secret password becomes visible, which defeats the whole point of protecting it!
Code:
Private Sub Workbook_Open()
With Sheet1
.Protect Password:="my password", UserInterfaceOnly:=True
.EnableOutlining = True
End With
End Sub
So: How can I hide and disable the VBA interface so that none of the macros can be opened or edited while the sheet is protected?

Thanks for any help/guidance on this.
