Okay guys, so now we're going to speak about the before delete event. And as the name suggests, it executes some VBA code before each sheet is deleted. So I have created here a sheet called before delete event. Okay, I'm just going to right click and go to View code to go to the events for that sheet. I'm going to select worksheet here and then I'm going to select before Delete to be my event. I'm gonna delete this worksheet, selection change event.
And we can have a message box appear that says bye bye for example. Okay, and I'm going to close that. If we delete the sheet here. You can see here that the code has not been executed yet. When you click on delete, okay, you will see actually that the message box will appear before the sheet disappears. Okay.
So this is why it's called the before delete. Because the code will be executed before deleting the sheet. Okay, so you can see here, message box has appeared, the sheet still exists, you click OK, she disappears. I've never used this before. I'm not sure why you would want to use it. Okay?
But, you know if you have an idea and there's something that you that this would be useful in, in a certain application in your work or so, just let me know. I'd be interested. Thank you very much.