Additional Delete Sheet Warning.

FishingIsMoreFun

Board Regular
Joined
Sep 10, 2011
Messages
135
Hi all

I have an income budget workbook and the information it hold will be important.

Certain sheets hold VBA and spreadsheet formula.

I have Protected the important sheets however Excel still allows for a sheet to be deleted (with warning).

At present I am not sure if protecting the whole workbook will cause the VBA to bug out and I will have to add "Protect"/"UnProtect" Workbook everywhere, but I guess I would like to leave the usability of deleting a sheet.

Is there anyway for VBA to detect when a user has clicked "delete" and apply a warming before the standard Excel warning appears.

I delete so many sheets If get tired I can be careless and have often clicked "Delete Sheet" after the windows warning, just out of habit.

Cheers
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I think that your only option is to protect the workbook's structure.

There isn't a Workbook_BeforeSheetDelete or similar event
 
Upvote 0
Ahh ok

I will have to edit the code to allow for the adding of worksheets and protect the book.
It pays to ask on here.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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