Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Protect worksheet from deletion
Is there a way to password protect one worksheet from being deleted, while
allowing users to add new worksheets? Failing that, is there a way to password protect one worksheet from being deleted, while allowing a macro program to add a new sheet? -- Richard |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Protect worksheet from deletion
Protect the workbook and provide a macro that unprotects the workbook, adds a
sheet and then reprotects the workbook. Option Explicit Sub testme02() With ThisWorkbook .Protect Password:="hi there" .Worksheets.Add .Protect Structu=True, Windows:=False, Password:="hi there" End With End Sub Just a warning: workbook protection like this is easily broken. Remember to protect the project in the VBE, else others will see the password in the code. Tools|VBAProject Properties|Protection tab Lock the project for viewing and give it a memorable password. Richard wrote: Is there a way to password protect one worksheet from being deleted, while allowing users to add new worksheets? Failing that, is there a way to password protect one worksheet from being deleted, while allowing a macro program to add a new sheet? -- Richard -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Keyboard Shortcuts - Protect Worksheet | New Users to Excel | |||
how to protect a worksheet from printing ? | Excel Discussion (Misc queries) | |||
Protect Worksheet from Copy Past | Excel Discussion (Misc queries) | |||
how to protect excel worksheet and still use the outline buttons? | Excel Worksheet Functions | |||
lost my password (worksheet protect) | Excel Discussion (Misc queries) |