+ Reply to Thread
Results 1 to 4 of 4

Delete a sheet if it exists without looping?

  1. #1
    Registered User
    Join Date
    10-27-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    98

    Question Delete a sheet if it exists without looping?

    Hi All

    It may well be that this is not possible, but is there anyway to delete a sheet if it exists without looping through every worksheet?

    Something like:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Both of the above give me a run-time error '5': Invalid procedure call or argument

    Many thanks in advance

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Delete a sheet if it exists without looping?

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    10-27-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Delete a sheet if it exists without looping?

    Perfect thank you so much!

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Delete a sheet if it exists without looping?

    Glad I could contribute...tx for rep +

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to delete a value that already exists in another sheet
    By vegnyh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2020, 10:08 AM
  2. [SOLVED] If sheet exists called Sheet* then delete
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-06-2016, 08:31 AM
  3. [SOLVED] Delete sheet if it exists
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-15-2015, 03:08 PM
  4. [SOLVED] Check if sheet exists and delete it using IF ERROR function in VBA
    By Jardim in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-25-2012, 12:06 PM
  5. [SOLVED] Delete rows in sheet by looping backwards !
    By Petter120 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2012, 06:52 AM
  6. Delete a sheet, if it exists
    By LydiasDad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2011, 09:06 PM
  7. delete sheet if exists help needed
    By mattfaust in forum Excel General
    Replies: 2
    Last Post: 08-30-2006, 12:28 PM

Tags for this Thread

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