Preventing Sheet Deletion

R

RWN

xl2k/Win2kPro

I probably know the answer to this but I'll ask anyway(!).

Is there any way to protect against deleting a *specific* worksheet
other than intercepting the event in VBA?
I was hoping that protecting the sheet would do it, but it doesn't.
I don't want to disallow deleting other sheets (so protecting the
workbook structure is not what I want).
 
A

Alan

I don't think so, and intercepting via VB code would be ineffective if the
user chose to open with macros disabled. You can make a workbook useless
without macros enabled providing the users don't want (or do not have the
knowledge) to overcome the protection of the code. But in your original
question, I believe the answer to be no,
I have such a workbook, I'll send it to you if you want it. Replace 111 with
8202 in my address,
Regards,
 
R

RWN

Thanks for the confirmation and the offer.
I don't have an issue with the macro security features in this case but
only want to prevent the inadvertent deletion of a sheet (the nature of
the app. makes it a possibility).

Again, thanks.
 
D

Dave Peterson

Maybe you could protect the workbook structure, but give the users a macro that
will delete sheets (unprotecting the workbook, deleting, reprotecting the
workbook).

You could make sure only the worksheets that shouldn't be deleted are kept.
 
D

Dave Peterson

You could make sure that the worksheets that shouldn't be deleted are kept.

(closer to English.)
 
R

RWN

Thanks Dave.
I know that I can do it in VBA, I was just hoping (beyond hope) that
there was already an existing function that would do the trick.
(getting lazy in my old age!! :)
 
Top