Thread: Unlock sheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Archer[_3_] Mike Archer[_3_] is offline
external usenet poster
 
Posts: 8
Default Unlock sheet

Do you mean Unprotect?
You could use:

ActiveSheet.Unprotect("yourpassword")

But then the password can be read in the module if the
project is not locked for viewing.

-----Original Message-----
I've got a spreadsheet with some cells that need to be

locked on it.
However, I need to then unlock the sheet when a macro is

run over it
which hides some columns. Is there a way to unlock a

spreadsheet that
has password protection?
When I use the command ".unlock" it comes up with a

prompt for the
password. Can I somehow put that into the code?
Basically I need to unlock the sheet to run a macro, but

I can't seem
to totally automate it for other users as currently I get

a prompt for
the password.
Any ideas?
Thanks for your help,
Paul


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

.