protecting a workbook from deletion

Erich Duff

Board Regular
Joined
Apr 20, 2005
Messages
129
All,

I doubt this can be done, but any input would be greatly appreciated.

A doorknob in my office just deleted an extremely important file. Luckily, we back up our server every night and I recovered yesterday's copy of it. However, this workbook is edited by three or four different people up to 20 or 30 times a day. So everything we've done today is lost and needs to be researched and entered again.

Is there a way to allow people to edit the book, but not actually delete it? And I'm talking, not be allowed to right-click-delete, that sort of thing.

I guess, failing that, the only thing I can think of is to create a BeforeClose event macro that will save a backup of the book every time it's closed. Whaddaya think?

Erich
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
Erich Duff said:
A doorknob in my office
Erich

Where do you work?:) Inanimate objects that can not only operate a computer but delete Excel worksheets.:)

I'm not up much on protection but could you not protect the workbook/worksheet and still allow user input.
 

Erich Duff

Board Regular
Joined
Apr 20, 2005
Messages
129
Hey, Norie,

Oh, inanimate object is right. Unfortunately, it doesn't actually know how to operate a computer, just how to mess it up :confused:

I don't know much about protection either, but it seems like there's no way to actually protect the book from being deleted. Even if I make it read-only, it merely asks the user if deletion is really what it wants to do. Which still doesn't seem to stop certain people clicking "yes". And because the file's on a server and not a local drive, there's no Recycle Bin, even--once it's gone, it's gone. Which is a pretty dumb setup, if you ask me.

Erich
 

highndry

Board Regular
Joined
Nov 28, 2005
Messages
247
Erich Duff

You can ask your network engineer to have the directory to be protected. In other words users will be able to read and save but will not have access to delete the file in that subdirectory/folder.
 

Erich Duff

Board Regular
Joined
Apr 20, 2005
Messages
129
Hi Highndry,

Excellent suggestion. I have administrator access to the server and have been playing around with that idea. It's taking some work to get it to work properly, but I've never done it before and didn't realize I could. Thanks again for the tip, I definitely like that better than the BeforeClose idea, since that would mean setting up each individual file to run that macro. Protecting the entire folder and its contents is a heck of a lot easier.

Cheers!

Erich
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,003
Messages
5,834,825
Members
430,324
Latest member
bosphoruskid

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
Top