Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
0 (zero) auto delete Ben in CA[_2_] Excel Discussion (Misc queries) 4 December 11th 08 08:00 PM
Auto Copy/autofill Text from sheet to sheet if meets criteria Joyce Excel Discussion (Misc queries) 0 November 20th 08 11:05 PM
Auto delete gane Excel Worksheet Functions 0 November 27th 07 08:14 AM
Auto delete..... gane New Users to Excel 2 November 21st 07 05:58 AM
Auto insert/delete on other sheet broogle Excel Programming 10 January 18th 05 02:34 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"