![]() |
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 |
Password protection
..
|
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 |
All times are GMT +1. The time now is 12:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com