Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Unprotect Sheet with Password Included

Hi,

Hoping someone can help. I am trying to create a button that does the
following

1. Unprotects my excel sheet
2. Automatically inserts the unprotect password into the string so the user
doesn't have to type it. Probably seems odd and a bad use of even having a
password but in the end it makes sense for what I am trying to do.

Right now I am using the following code to unprotect the sheet, but again it
prompts me for the password instead of automatically inserting it in.

Activesheet.unprotect

Thanks for any help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Unprotect Sheet with Password Included

You can add the password parameter to both unprotect and protect

e.g
ActiveSheet.Unprotect ("myPassword")
ActiveSheet.Protect ("myPassword")

or you can use a named parameter

ActiveSheet.Unprotect Password:="myPassword"
ActiveSheet.Protect Password:="myPassword"


--

Regards,
Nigel




"James C." wrote in message
...
Hi,

Hoping someone can help. I am trying to create a button that does the
following

1. Unprotects my excel sheet
2. Automatically inserts the unprotect password into the string so the
user
doesn't have to type it. Probably seems odd and a bad use of even having a
password but in the end it makes sense for what I am trying to do.

Right now I am using the following code to unprotect the sheet, but again
it
prompts me for the password instead of automatically inserting it in.

Activesheet.unprotect

Thanks for any help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Unprotect Sheet with Password Included

Try

ActiveSheet.Unprotect Password:="xxx"
Mike

"James C." wrote:

Hi,

Hoping someone can help. I am trying to create a button that does the
following

1. Unprotects my excel sheet
2. Automatically inserts the unprotect password into the string so the user
doesn't have to type it. Probably seems odd and a bad use of even having a
password but in the end it makes sense for what I am trying to do.

Right now I am using the following code to unprotect the sheet, but again it
prompts me for the password instead of automatically inserting it in.

Activesheet.unprotect

Thanks for any help


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Unprotect Sheet with Password Included

With Sheet1
.Unprotect Password:="ABCD"
End With




"James C." wrote in message
...
Hi,

Hoping someone can help. I am trying to create a button that does the
following

1. Unprotects my excel sheet
2. Automatically inserts the unprotect password into the string so the
user
doesn't have to type it. Probably seems odd and a bad use of even having a
password but in the end it makes sense for what I am trying to do.

Right now I am using the following code to unprotect the sheet, but again
it
prompts me for the password instead of automatically inserting it in.

Activesheet.unprotect

Thanks for any help




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to unprotect sheet so I cn sve it but need a password? scout ron Excel Discussion (Misc queries) 2 May 28th 10 03:05 PM
code to unprotect sheet with password BorisS Excel Programming 7 June 22nd 06 02:26 AM
Unprotect Sheet Password in Macros Theresa Excel Programming 4 April 2nd 06 01:51 PM
Forgot the password (to unprotect a sheet) Venkatesh V Excel Discussion (Misc queries) 1 March 29th 06 08:32 AM
Protect/unprotect sheet with password with VBA? dragontale[_7_] Excel Programming 1 April 19th 04 09:29 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"