+ Reply to Thread
Results 1 to 4 of 4

VBA to delete worksheets except one specific sheet

  1. #1
    Forum Contributor
    Join Date
    02-13-2014
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    140

    VBA to delete worksheets except one specific sheet

    Hi, I have a workbook with More than 10 sheets with different name.

    I need VBA to delete all nine sheets except one sheet named as "Master Call"

    Please note: the number of sheets will be increased or decreased time to time

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,876

    Re: VBA to delete worksheets except one specific sheet

    Here!

    Please Login or Register  to view this content.
    Cheers!
    Deep Dave

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,876

    Re: VBA to delete worksheets except one specific sheet

    Duplicate Post Mods!

    Sorry..
    Last edited by NeedForExcel; 10-13-2015 at 08:14 AM.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,519

    Re: VBA to delete worksheets except one specific sheet

    Hi there,

    The following version will avoid an error message being generated if the "Master Call" worksheet doesn't exist - without this check the routine will try to delete all worksheets and create a "The workbook must contain at least one worksheet" error message:

    Please Login or Register  to view this content.
    Just a little added extra!

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

+ 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. [SOLVED] Delete all blanks rows in specific range on all worksheets
    By Dumy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-01-2015, 03:06 PM
  2. VBA loop to insert and delete worksheets in a specific sheet within a list
    By supppy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-09-2014, 09:02 PM
  3. [SOLVED] Delete specific row for all worksheets
    By lorena ferraz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2014, 10:44 AM
  4. How to delete entire row if first cell of it is empty for specific range and worksheets
    By roshanvmech in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2014, 12:36 PM
  5. [SOLVED] Macro to delete all worksheets except for one with specific name
    By jaimealvarez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2012, 12:01 PM
  6. Delete duplicates on a specific sheet
    By slim1313 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2009, 12:49 PM
  7. [SOLVED] How to delete specific row from sheet?
    By Sirritys in forum Excel General
    Replies: 5
    Last Post: 07-11-2006, 01:35 PM

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