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
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,057
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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,455
Messages
5,572,229
Members
412,448
Latest member
ManuW
Top