Workbook password protection - how'd that happen?

User avatar
mbarron
2StarLounger
Posts: 112
Joined: 25 Jan 2010, 20:19

Workbook password protection - how'd that happen?

Post by mbarron »

I've somehow protected a workbook without being aware of how I did it. I didn't use a macro - I would use something like: ActiveWorkbook.Protect Password:= "blahblah" Is there any other code that would apply protection and a password? And I know I didn't do it using the interface (using 2007).

Is there a way to password protect a workbook within the VBE? Something like a property setting that I may have mis-clicked?

User avatar
HansV
Administrator
Posts: 78237
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Workbook password protection - how'd that happen?

Post by HansV »

You can protect a workbook by any of the following methods:
- Click Protect Workbook on the Review tab of the ribbon.
- Select Tools | General Options... from the Save As dialog.
- Run VBA code with ActiveWorkbook.Protect.
- Set the Password property of ThisWorkbook in the Properties pane in the Visual Basic Editor.
Best wishes,
Hans

User avatar
mbarron
2StarLounger
Posts: 112
Joined: 25 Jan 2010, 20:19

Re: Workbook password protection - how'd that happen?

Post by mbarron »

That's what I thought.

Thanks Hans