View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Protectin/Unprotecting Sheets

Hi Hugo,

Untested but try enabling outlining before the protection.

.EnableOutlining = True
.Protect Password:="topsecret", UserInterfaceOnly:=True

If that does not work try a workbook open event and unprotect and re-protect.

--
Regards,

OssieMac


"Hugo" wrote:

Hi,

I've been using the following code to protect my sheets:

Sub protectsheet()
With ActiveSheet

.Protect Password:="topsecret", UserInterfaceOnly:=True

.EnableOutlining = True

End With

End Sub

I'd like the sheets, once they have been protected, to have the outlining
feature enabled, which holds true when I protect/unprotect the open file, but
once I close out of the file and re-open it, it tells me that I cannot use
the outlining features when it is protected. Any thoughts?

Thanks!
--
Hugo