Reputation: 81
Environment:
Visual Studio 2013
MS Office 2013
C#
I just discovered the SheetBeforeDelete event which is very helpful for my application's requirements.
It seems, however, that all the programmer can expect is to be notified about the impending, inevitable disappearance of a worksheet.
What if we need to programmatically implement a policy whereby the removal of certain worksheet(s) is verboten? Is there a way to instruct Excel "Abort the ongoing operation"?
Upvotes: 0
Views: 295
Reputation: 49445
The best what you can do is to use the Protect method of the Worksheet
or Workbook
class which allows to protect a worksheet so that it cannot be modified.
Upvotes: 1