+ Reply to Thread
Results 1 to 4 of 4

Auto delete of a sheet

  1. #1
    Wendell A. Clark
    Guest

    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. #2
    Ron de Bruin
    Guest

    Re: 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" <dracowiz@hotmail.com> wrote in message news:%23$THJ6ceGHA.380@TK2MSFTNGP04.phx.gbl...
    >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. #3
    Nate Oliver
    Guest

    Re: 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. #4
    Wendell A. Clark
    Guest

    Re: 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" <nathan.oliver@gmail.com> wrote in message
    news:1147883673.981855.273720@i40g2000cwc.googlegroups.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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1