I have a button that triggers a chain of events. One of these events is to **delete a sheet**. Before the user deletes anything, I pop up my custom YES/NO message asking them to confirm the whole process.
Then comes the sub event of deleting the sheet, and **Excel pops up its own window** for confirming the removal of the sheet. Problem is that if the user says "no" at that point, that sets my application in an inconsistent state.
How can I **bypass Excel asking to confirm the deletion** of a sheet ?
Supprimer Sheets and avoid Excel asking the user to confirm, using custom messages instead
Re: Supprimer Sheets and avoid Excel asking the user to confirm, using custom messages instead
You can change the default display alert parameter of Excel using:
```
Application.DisplayAlerts = False
```
don't forget to restore the standard behavior at the end of your process:
```
Application.DisplayAlerts = True
```
```
Application.DisplayAlerts = False
```
don't forget to restore the standard behavior at the end of your process:
```
Application.DisplayAlerts = True
```