ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Oh no! Need help on unprotect password protection (https://www.excelbanter.com/excel-programming/289678-oh-no-need-help-unprotect-password-protection.html)

jasonsweeney[_33_]

Oh no! Need help on unprotect password protection
 
I was fooling around with some code to protect all of my worksheets,
except unlocked cells.

Somehow, in error, I programmed a password into each sheet to
unprotect.

I have never put a password in any of the sheets.

the code that I think caused this was
_____

Sheet1.protect enable selection = xlUnlockedCell

_____

Did this code somehow set my password to something? How do I undo?


---
Message posted from http://www.ExcelForum.com/


Rob van Gelder[_4_]

Oh no! Need help on unprotect password protection
 
Jason,

That line would cause a syntax error.
I'm guessing you've actually got two lines.
Sheet1.protect enable
selection = xlUnlockedCell

The password could be set to whatever the variable 'enable' was set to.

If earlier in your code you have written something like:
enable = "True"
or
enable = "Yes"

Then perhaps that's what your password is?

You might like to look up online help for the Protect method.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"jasonsweeney " wrote in
message ...
I was fooling around with some code to protect all of my worksheets,
except unlocked cells.

Somehow, in error, I programmed a password into each sheet to
unprotect.

I have never put a password in any of the sheets.

the code that I think caused this was
_____

Sheet1.protect enable selection = xlUnlockedCell

_____

Did this code somehow set my password to something? How do I undo?


---
Message posted from http://www.ExcelForum.com/




jasonsweeney[_34_]

Oh no! Need help on unprotect password protection
 
Ok. I found a password finding tool on these threads (thank god).

New question:

Can someone show me some code that protects each sheet (not using a
loop) and makes it so that only unlocked cells can be selected??


---
Message posted from http://www.ExcelForum.com/


John Wilson

Oh no! Need help on unprotect password protection
 
jason,

The following will allow editing in only unlocked cells:

ActiveSheet.EnableSelection = xlUnlockedCells
ActiveSheet.Protect UserInterfaceOnly:=True
ActiveCell.Select

If you want to do it on multiple sheets, you'll have to activate
each of them and do it or use a loop.

John

"jasonsweeney " wrote in
message ...
Ok. I found a password finding tool on these threads (thank god).

New question:

Can someone show me some code that protects each sheet (not using a
loop) and makes it so that only unlocked cells can be selected??


---
Message posted from http://www.ExcelForum.com/




Tom Ogilvy

Oh no! Need help on unprotect password protection
 
Is that actually the code you used or did you have

Sheet1.protect enableselection = xlUnlockedCell

If the latter, it is possible that this would be interpreted as

Sheet1.protect password:=True

since enableselection and xlUnlockedCell would both be seen as uninitialized
variables and:

? enableselection = xlUnlockedCell
True


In any event you can try

Sheet1.Unproted enableselection = xlUnlockedCell

--
Regards,
Tom Ogilvy


"jasonsweeney " wrote in
message ...
I was fooling around with some code to protect all of my worksheets,
except unlocked cells.

Somehow, in error, I programmed a password into each sheet to
unprotect.

I have never put a password in any of the sheets.

the code that I think caused this was
_____

Sheet1.protect enable selection = xlUnlockedCell

_____

Did this code somehow set my password to something? How do I undo?


---
Message posted from http://www.ExcelForum.com/




jasonsweeney[_36_]

Oh no! Need help on unprotect password protection
 
Tom,

I still don't know what I did with that. Excel clearly thought
programmed a password. I found a quick a dirty "brute force attack
password macro on these threads and used that. It said the passwor
for those sheets was "AAAAAAAABABF". Weird. Thnaks for the rest o
the code, sheets are working good now

--
Message posted from http://www.ExcelForum.com


John Wilson

Oh no! Need help on unprotect password protection
 
jason,

Depending on what you used to remove the passwords, if it told you
what it was, it's almost definitely not the original password.
For more on this read he

http://www.mcgimpsey.com/excel/removepwords.html

John

"jasonsweeney " wrote in
message ...
Tom,

I still don't know what I did with that. Excel clearly thought I
programmed a password. I found a quick a dirty "brute force attack"
password macro on these threads and used that. It said the password
for those sheets was "AAAAAAAABABF". Weird. Thnaks for the rest of
the code, sheets are working good now.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 04:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com