Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect Sheet - VB code to specify password
Howdie, Sheets("A").protect is how to protect a sheet, and similar Sheets("B").Unprotect. I run a Macro that first unprotects a sheet, then when Macro is finished Re protects the sheet. I want to now specify a password, lets say ABC. Whats the VB to do that....? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect Sheet - VB code to specify password
Hi Darin,
Sheet("B").Unprotect "ABC" assuming "ABC" is your password Thanks Xcelion "Darin Kramer" wrote: Howdie, Sheets("A").protect is how to protect a sheet, and similar Sheets("B").Unprotect. I run a Macro that first unprotects a sheet, then when Macro is finished Re protects the sheet. I want to now specify a password, lets say ABC. Whats the VB to do that....? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect Sheet - VB code to specify password
Public sub yourMacro()
Shetts("A").Unprotect "ABC" 'Your code Sheets("A").Protect "ABC" End Sub -- ---------------------------- Mauro Gamberini Sheets("A").protect is how to protect a sheet, and similar Sheets("B").Unprotect. I run a Macro that first unprotects a sheet, then when Macro is finished Re protects the sheet. I want to now specify a password, lets say ABC. Whats the VB to do that....? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to protect/unprotect a sheet using a macro with password | Excel Discussion (Misc queries) | |||
Password protect only one VBA code module? | Excel Programming | |||
password protect vba code | Excel Discussion (Misc queries) | |||
password protect vba code | Excel Programming | |||
password protect vba code | Excel Programming |