Way to protect a single worksheet from deletion?

jareck

New Member
Joined
Feb 23, 2007
Messages
14
I'll also listen to any other suggestions for how to make sure copyright information for my company's spreadsheets does not get altered or removed, but here is what I'm trying to do at the moment. I've created a .jpg of my company's copyright statement, and put it in its own tab at the front of each workbook we have. Then I protected the sheet to keep the picture from being deleted. What I want to do now is prevent the sheet itself from being deleted, but the "Protect Workbook" seems to be an all-sheets or nothing deal.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
yep, all-sheets or nothing deal!

Hi,
let's try to find a workaround then...

1. do you use code in that workbook? that would open some doors

without code:
2. if you put some important information on that sheet (hidden cells or course) which is really needed for the workbook to fonction well, your users couldn't delete it without harm

very simple example
Sheet1 is the sheet to stay
Sheet2 is a calculations-sheet
Sheet2 B1 has =A1
replace that formula by =A1*Sheet1!A1
in Sheet1 A1 there is simply the number 1

when Sheet1 is deleted the formula in B1 will show #REF

kind regards,
Erik
 
Upvote 0
I'll also listen to any other suggestions for how to make sure copyright information for my company's spreadsheets does not get altered or removed, but here is what I'm trying to do at the moment. I've created a .jpg of my company's copyright statement, and put it in its own tab at the front of each workbook we have. Then I protected the sheet to keep the picture from being deleted. What I want to do now is prevent the sheet itself from being deleted, but the "Protect Workbook" seems to be an all-sheets or nothing deal.

First off you don't. Period. Excel isn't a secure environment nor has it ever been marketed as one. You might want to looking into writing a good EULA however, as that's really all you can do. If someone really wants your information they'll get it.

As for the non-deletable sheet take a look at How to Create a Startup Screen with a UserForm.

They're relatively easy to set up and can add a certain flair to your app.

HTH,

Smitty
 
Upvote 0
Hello to you all,

I thought I join the conversation.

You could try to desactivate the Delete Sheet from the edit Menu and the contextual menu [right clicking the worksheet tab name].

But that will only works if the macros are allowed to run.

My idea is to hide all sheets apart from copyright sheet with written on it :
Macros needs to be enabled in order to use the worksheet.

When your code is good, set all sheets to veryhidden excepts copyright sheet and password protect the vba projects for viewing.

Protect the vba project with a password so the code can't be removed or changed.

In the workbook open set other worksheets to visible
ie: code
''Sheet 3 is the copyright, Delete Sheet will be inactive when Sheet 3 is activate.
''Sheet 4 is another sheet

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'ie sheet4 is set to hidden on close
Sheet4.Visible = xlSheetVeryHidden
End Sub

Private Sub Workbook_Open()
'sheet4 is set to visible on open
Sheet3.Activate
Sheet4.Visible = xlSheetVisible
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.CodeName = "Sheet3" Then
enableDelete (False)
Else
enableDelete (True)
End If
End Sub

Sub enableDelete(deleteIt As Boolean)
Excel.CommandBars("edit").Controls("De&lete Sheet").Enabled = deleteIt
Excel.CommandBars("Ply").Enabled = deleteIt
End Sub


You may want to try if this can help to secure more your workbook.
The solution of course is not 100 % fiable.
 
Upvote 0
all very good solutions...I may try and incorporate something from all of them, and the Splash Screen will definitely impress the boss :)

This seems like such an obvious and easy feature for MS to implement...maybe they'll get around to it in '09
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top