ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling or capturing a Delete Sheet command (https://www.excelbanter.com/excel-programming/349734-disabling-capturing-delete-sheet-command.html)

SteelDetailer[_2_]

Disabling or capturing a Delete Sheet command
 
I have a workbook with a few pages that I do not want to allow the user to
delete, but other sheets (ones that the user adds) I want to allow the user
to delete.

I cannot find a "Before_Sheet_Delete" event, or anything similar to it.

Is there anything I can do? Thanks in advance!!

Rich

Dave Peterson

Disabling or capturing a Delete Sheet command
 
I think I would protect the workbook (not worksheet), then provide a macro to
add and delete sheets.

Then the macro can validate the request and block them if it's not right.

Your macro would unprotect the workbook, do its stuff, and then reprotect the
workbook.

SteelDetailer wrote:

I have a workbook with a few pages that I do not want to allow the user to
delete, but other sheets (ones that the user adds) I want to allow the user
to delete.

I cannot find a "Before_Sheet_Delete" event, or anything similar to it.

Is there anything I can do? Thanks in advance!!

Rich


--

Dave Peterson

SteelDetailer[_2_]

Disabling or capturing a Delete Sheet command
 
Originally, I did that. However, I wanted the user to have the ability to
re-arrange the order of the individual worksheets.

Dave Peterson

Disabling or capturing a Delete Sheet command
 
Supply another macro that can change the order???

SteelDetailer wrote:

Originally, I did that. However, I wanted the user to have the ability to
re-arrange the order of the individual worksheets.


--

Dave Peterson


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com