I have a spreadsheet that emails a single sheet by creating a copy of the specific sheet and then emailing the copy. I wrote the code this way so that I could remove all the controls, buttons, etc from the sheet before sending. At the end of the macro, the code erases the created copy. Everything works fine but after Outlook spawns, I enter the email address and press 'Send'. It automatically returns to my workbook and continues the macro. This is where is erases the created copy of the sheet. At this time, the code stops and a message box pops up to request my approval to delete the created copy. My question: Is there a way I can avoid the message box, or have the code answer the message box with 'yes' (it's ok to delete) so that I don't have to actually click 'Yes' to continue the deletion? Basically I'm just looking for code to auto-answer the message box or simply keep it from popping up in the first place.
Bookmarks