Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How and where is ProtectStructure property set for an Excel workboook 1

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Hello,

I have an Excel2000 workbook that would not allow me to insert, copy, rename, etc. (eg everything on the menu when you right click a worksheet name on the tabs on the bottom was grayed out).

By nosing around in the workbook properties, I tracked it down to the ProtectStructure property which according to the help is read only. I didn't intentionally set this and nowhere in the VBA code do I do anything with Protect.

Does anyone know how this property is set?

Thanks in advance for any help you can give me!

PS. I was able to clear it with the following code:

myWorkbookObject.Protect structure:=False

 
I'm not sure if I understand your problem, but there is the unprotect() method of the workbook object... if that's what you're looking for. conversely, the protect() method turns on protection, which includes an option for protecting the structure, hence changing the value of the ProtectStructure property.
All this can also be done manually from the protection submenu of the tools menu.

-Venkman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top