Allanpsaila
New Member
- Joined
- Feb 28, 2007
- Messages
- 9
Hello, I have a number of sheets in a work book and I want to run code when the user tries to delete one of the sheets. But if the sheet they want to delete is from a pivot-table drill-through then they should be allowed to delete it.
I know there is no 'On Delete' function (otherwise this would be easy).
I know the sheet names of course for the sheets that need to be in the workbook but how can I prevent them from deleting the sheets without having to protect the entire workbook?
I have only seen solutions where there are counts of worksheets but this will only notify if there was a delete (and will not work if there is a page added).
Any help would be greatly appreciated.
Allan Psaila
I know there is no 'On Delete' function (otherwise this would be easy).
I know the sheet names of course for the sheets that need to be in the workbook but how can I prevent them from deleting the sheets without having to protect the entire workbook?
I have only seen solutions where there are counts of worksheets but this will only notify if there was a delete (and will not work if there is a page added).
Any help would be greatly appreciated.
Allan Psaila