Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Protect an Excel WorkSheet from being deleted

I have a blank WorkSheet called "Scratch" in an Excel workbook with lots of
VB code.

I want the user to be able to do anything with the blank WorkSheet called
"Scratch" except to Rename it or to Delete it.

Stumped. Please help. Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Protect an Excel WorkSheet from being deleted

You must protect the workbook to prevent deleting or renaming a sheet.

ToolsProtectionProtect Workbook.

Checkmark "structure".


Gord Dibben MS Excel MVP

On Fri, 25 May 2007 11:28:01 -0700, Trader_in_Paradise
wrote:

I have a blank WorkSheet called "Scratch" in an Excel workbook with lots of
VB code.

I want the user to be able to do anything with the blank WorkSheet called
"Scratch" except to Rename it or to Delete it.

Stumped. Please help. Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Protect an Excel WorkSheet from being deleted



"Gord Dibben" wrote:

You must protect the workbook to prevent deleting or renaming a sheet.

ToolsProtectionProtect Workbook.

Checkmark "structure".


Gord Dibben MS Excel MVP


Thanks, Gord,


I still would like to find a way to protect just one named worksheet in a
workbook from being deleted. Is there a way to trap the Woeksheet Delete
event for that particular worksheet? Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Protect an Excel WorkSheet from being deleted

There is no Worksheet_delete (or worksheet_beforedelete or
worksheet_afterdelete) event.

Have you thought about protecting the workbook, then giving the user a macro
that would delete any sheet except for the one(s) you don't want deleted??

Trader_in_Paradise wrote:

"Gord Dibben" wrote:

You must protect the workbook to prevent deleting or renaming a sheet.

ToolsProtectionProtect Workbook.

Checkmark "structure".


Gord Dibben MS Excel MVP


Thanks, Gord,


I still would like to find a way to protect just one named worksheet in a
workbook from being deleted. Is there a way to trap the Woeksheet Delete
event for that particular worksheet? Thank you.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Protect an Excel WorkSheet from being deleted



"Dave Peterson" wrote:

There is no Worksheet_delete (or worksheet_beforedelete or
worksheet_afterdelete) event.

Have you thought about protecting the workbook, then giving the user a macro
that would delete any sheet except for the one(s) you don't want deleted??


Thanks, Dave,


I already have two hidden sheets. I also have a VBA routine behind a Delete
Button that allows the user to delete a sheet, except if the sheet is named
Options or Date and as long as the sheet desired to delete is not the only
visible sheet. I did not know I could protect the workbook and still allow
sheets to be deleted.

I will try your suggestion in my code tomorrow. Thanks again.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Protect an Excel WorkSheet from being deleted

In your code, you'll have to check the configuration, unprotect the workbook,
delete the sheet, reprotect the workbook.



Trader_in_Paradise wrote:

"Dave Peterson" wrote:

There is no Worksheet_delete (or worksheet_beforedelete or
worksheet_afterdelete) event.

Have you thought about protecting the workbook, then giving the user a macro
that would delete any sheet except for the one(s) you don't want deleted??


Thanks, Dave,


I already have two hidden sheets. I also have a VBA routine behind a Delete
Button that allows the user to delete a sheet, except if the sheet is named
Options or Date and as long as the sheet desired to delete is not the only
visible sheet. I did not know I could protect the workbook and still allow
sheets to be deleted.

I will try your suggestion in my code tomorrow. Thanks again.


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Protect an Excel WorkSheet from being deleted

http://tutorialway.com/protection-in...eets-workbook/
Helpful site
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
How do I protect formulas from being deleted? Connie Excel Worksheet Functions 2 May 10th 06 01:04 AM
How to protect cells from getting deleted or resized? nilangini Excel Worksheet Functions 1 February 21st 06 08:47 PM
How can I password protect a worksheet from being deleted Kathy081403 Excel Discussion (Misc queries) 2 December 21st 05 10:36 PM
How do i protect formulas in excel from being deleted? Sarah Excel Discussion (Misc queries) 4 June 10th 05 05:07 PM
protect a workbook from being deleted Toni's Taxi Excel Discussion (Misc queries) 1 January 12th 05 07:38 PM


All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"