Unprotect a worksheet

B

Bryan

Hi,

Got a bit of a problem with a protected worksheet. The person who created
the sheet has now left my company and we need to access it to update it with
new formulas. Is it possible to do this without a password e.g. saving the
sheet as a seperate name - or do we have to re-build the entire sheet from
scratch?

thanks,
Bryan
 
O

Otto Moehrbach

JE
A second question/problem. I made up a dummy file with 3 sheets. I
protected the file and each sheet with passwords, different passwords in
each case.
The code removed the sheet protections and the associated passwords, but
it did nothing about the workbook-open protection or password. In fact, a
MsgBox at the start said that the file did not have protection for workbook
structure or windows. When I now run the code again, the MsgBox says that
the file does not have sheet or workbook structure or window protection.
Did I miss something?
Thanks again for your help. Otto
 
O

Otto Moehrbach

JE
Now that I have read everything you wrote on your site, I take back my
last message. Thanks. Otto
 
P

Peo Sjoblom

Otto,

I think both your questions has one answer;

I believe J.E.'s "original passwords" are the password you set under
file>save as, tools>general options and password to open and password to
modify


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
O

Otto Moehrbach

JE
Another comment/question. In your site you differentiate between
Workbook protection and File protection. I've always considered Workbook
and File to mean the same thing, but I understand the distinction that you
explain as regards protection.
When I protected the file, I did so with Tools - Options - Security tab,
typed in a password. All that was done before I saved the file. I then
saved and closed and opened the file and verified that I indeed needed a
password to open the file.
As I understand your explanation in your site, your code should have
removed my Workbook protection, but it didn't. Did I miss something? Otto
 
G

Gord Dibben

Otto

There are several types of password protection.

1. Password to open the file. Can be set at File>Save As>Tools>General
Options.

2. Password on a protected worksheet. This is set at Tools>Protection>Protect
Sheet.

Many functions can be disabled using this type of protection.

3. Workbook Protection password. This is set at Tools>Protection>Protect
Workbook.

This protects the workbook from having sheets deleted and other functions
disabled.

4. VBA Project password to prevent viewers from looking at code modules.

NOTE: except for File to Open protection and VBA project passwords, most forms
of Excel protection are very weak and passwords can be easily cracked.


Gord Dibben MS Excel MVP

JE
Another comment/question. In your site you differentiate between
Workbook protection and File protection. I've always considered Workbook
and File to mean the same thing, but I understand the distinction that you
explain as regards protection.
When I protected the file, I did so with Tools - Options - Security tab,
typed in a password. All that was done before I saved the file. I then
saved and closed and opened the file and verified that I indeed needed a
password to open the file.
As I understand your explanation in your site, your code should have
removed my Workbook protection, but it didn't. Did I miss something? Otto

Gord Dibben MS Excel MVP
 
J

JE McGimpsey

Passwords that you enter, of whatever length, are converted, or hashed,
into what is effectively a 12-character string, and stored in the
workbook, rather than what you entered.

There can be an essentially infinite number of passwords, but each one
will hash to one of the 194K 12-character strings. Since the original,
or user-entered, password is not stored, only a representation of the
hash can be determined (e.g., by brute-force attempts to unprotect the
worksheet), not the original password.
 
O

Otto Moehrbach

JE
Thanks for that. I understand it. Otto
JE McGimpsey said:
Passwords that you enter, of whatever length, are converted, or hashed,
into what is effectively a 12-character string, and stored in the
workbook, rather than what you entered.

There can be an essentially infinite number of passwords, but each one
will hash to one of the 194K 12-character strings. Since the original,
or user-entered, password is not stored, only a representation of the
hash can be determined (e.g., by brute-force attempts to unprotect the
worksheet), not the original password.
 
Top