Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
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
Keyboard Shortcuts - Protect Worksheet Maurice New Users to Excel 4 July 13th 06 01:03 PM
how to protect a worksheet from printing ? LLVasco Excel Discussion (Misc queries) 1 June 13th 06 01:13 PM
Protect Worksheet from Copy Past Trying Hard Excel Discussion (Misc queries) 3 February 11th 06 07:13 PM
how to protect excel worksheet and still use the outline buttons? sylvia Excel Worksheet Functions 0 December 6th 05 12:32 PM
lost my password (worksheet protect) Dan Winterton Excel Discussion (Misc queries) 1 January 18th 05 07:09 PM


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