#1   Report Post  
Posted to microsoft.public.excel.misc
Noemi
 
Posts: n/a
Default Password protection

Hi
I have read a number of questions and answers on password protection on
worksheets however I could not find one with the code I am looking to use.

I have a protected worksheet and when a cmd button is selected the worksheet
is unprotected, action in code performed and then worksheet is protected
again however.....

Is it possible when unprotecting the worksheet from VBA that the sheet is
unprotected without a message coming up asking for the password to be
entered, is it possible to enter the password into the code when unprotecting
and when protecting again in VBA that it protects with the password.

Thanks
Noemi

  #2   Report Post  
Posted to microsoft.public.excel.misc
damorrison
 
Posts: n/a
Default Password protection

..

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Password protection

Noemi

Sub SHEETUNPROTECT()
ActiveSheet.Unprotect Password:="justme"

'your code goes here

ActiveSheet.Protect Password:="justme"
End Sub




On Mon, 23 Jan 2006 15:46:02 -0800, "Noemi"
wrote:

Hi
I have read a number of questions and answers on password protection on
worksheets however I could not find one with the code I am looking to use.

I have a protected worksheet and when a cmd button is selected the worksheet
is unprotected, action in code performed and then worksheet is protected
again however.....

Is it possible when unprotecting the worksheet from VBA that the sheet is
unprotected without a message coming up asking for the password to be
entered, is it possible to enter the password into the code when unprotecting
and when protecting again in VBA that it protects with the password.

Thanks
Noemi


Gord Dibben MS Excel MVP
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
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
How can I remove workbook protection with no password? Tony Excel Discussion (Misc queries) 1 October 19th 05 09:55 PM
Password Issue keithl816 Excel Discussion (Misc queries) 6 July 10th 05 06:20 PM
Password protection for Excel sheets Alejandro Excel Discussion (Misc queries) 2 April 13th 05 03:33 PM
Password protection andy Excel Discussion (Misc queries) 1 December 7th 04 02:51 PM


All times are GMT +1. The time now is 05:50 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"