ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to force delete tabs (https://www.excelbanter.com/excel-programming/306904-macro-force-delete-tabs.html)

Randy[_11_]

Macro to force delete tabs
 
Hi,

i realize this is a lame VB question, but I can't find
the way to force the sheets.delete function to skip
the "are you sure" dialog box. Basically, I want a
function at the start of my pivot table macro to do a "if
exist, then delete; else create"

Any code snippets out there that do this?

thanks,
Randy

Tom Ogilvy

Macro to force delete tabs
 
Application.DisplayAlerts = False
Activesheet.Delete ' or sheets.Delete
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy

"Randy" wrote in message
...
Hi,

i realize this is a lame VB question, but I can't find
the way to force the sheets.delete function to skip
the "are you sure" dialog box. Basically, I want a
function at the start of my pivot table macro to do a "if
exist, then delete; else create"

Any code snippets out there that do this?

thanks,
Randy





All times are GMT +1. The time now is 04:31 PM.

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