Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatically deleting a worksheet (without warning prompt)
Hi, A macro I use deletes a sheet tab, however, it prompts me to confirm the deletion of the sheet. How can I remove this prompt so the macro runs without any user interaction? Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatically deleting a worksheet (without warning prompt)
I think you can use this:
Sub delSheet() Application.DisplayAlerts = False Application.Sheets(1).Delete End Sub -- urkec "Guerilla" wrote: Hi, A macro I use deletes a sheet tab, however, it prompts me to confirm the deletion of the sheet. How can I remove this prompt so the macro runs without any user interaction? Matt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatically deleting a worksheet (without warning prompt)
Add these 2 lines to your macro:
Application.Displayalerts = False '<<<< here worksheets("TempData").Delete Application.Displayalerts = True ' <<< and here HTH "Guerilla" wrote in message oups.com: Hi, A macro I use deletes a sheet tab, however, it prompts me to confirm the deletion of the sheet. How can I remove this prompt so the macro runs without any user interaction? Matt |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatically deleting a worksheet (without warning prompt)
Both answers worked, thank you very much. Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need Warning Box before deleting cells | Excel Programming | |||
Delete Sheet w/o warning prompt... | Excel Programming | |||
Deleting rows from a worksheet automatically | Excel Worksheet Functions | |||
Deleting Sheets Warning | Excel Programming | |||
deleting sheet: how to omit warning | Excel Programming |