Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto delete of a sheet
I recorded the following code to delete a particular worksheet
Sheets("Temp").Select ActiveWindow.SelectedSheets.Delete My question is how do I suppress the confirmation dialogue? ANy hel p would be most welcome and thanks ;-) -- Wendell A. Clark, BS ------------------------------------- CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, please notify us by reply e-mail. You are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please destroy all copies of this communication and any attachments. Contact the sender if it continues. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto delete of a sheet
Hi Wendell
Use Application.DisplayAlerts = False 'your code Application.DisplayAlerts = True -- Regards Ron de Bruin http://www.rondebruin.nl "Wendell A. Clark" wrote in message ... I recorded the following code to delete a particular worksheet Sheets("Temp").Select ActiveWindow.SelectedSheets.Delete My question is how do I suppress the confirmation dialogue? ANy hel p would be most welcome and thanks ;-) -- Wendell A. Clark, BS ------------------------------------- CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, please notify us by reply e-mail. You are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please destroy all copies of this communication and any attachments. Contact the sender if it continues. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto delete of a sheet
Hello Wendell,
You're not the Leafs former power forward are you? Best wrist-shot ever! You'll want to toggle the Application's 'alerts' setting for this, e.g., Sub foo() Application.DisplayAlerts = False On Error Resume Next ' In case it's not there ThisWorkbook.Worksheets("Temp").Delete On Error GoTo 0 Application.DisplayAlerts = True End Sub Regards, Nate Oliver |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto delete of a sheet
Awesome thanks---
-- Wendell A. Clark, BS ------------------------------------- CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, please notify us by reply e-mail. You are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please destroy all copies of this communication and any attachments. Contact the sender if it continues. "Nate Oliver" wrote in message oups.com... Hello Wendell, You're not the Leafs former power forward are you? Best wrist-shot ever! You'll want to toggle the Application's 'alerts' setting for this, e.g., Sub foo() Application.DisplayAlerts = False On Error Resume Next ' In case it's not there ThisWorkbook.Worksheets("Temp").Delete On Error GoTo 0 Application.DisplayAlerts = True End Sub Regards, Nate Oliver |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
0 (zero) auto delete | Excel Discussion (Misc queries) | |||
Auto Copy/autofill Text from sheet to sheet if meets criteria | Excel Discussion (Misc queries) | |||
Auto delete | Excel Worksheet Functions | |||
Auto delete..... | New Users to Excel | |||
Auto insert/delete on other sheet | Excel Programming |