+ Reply to Thread
Results 1 to 3 of 3

VBA to un-hide all sheets between two sheets

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Cardiff
    MS-Off Ver
    2013
    Posts
    10

    VBA to un-hide all sheets between two sheets

    Hi all,

    I currently use a very simple piece of VBA for switching active sheets using a form button, along with hiding sheets that aren't relevant and un-hiding ones that are. I now have a series of sheets with enough sheets per macro that the way I used to do it is going to be less than ideal. The way I used to do it is this:

    Please Login or Register  to view this content.
    So simply put:

    1) Un-hide my destination sheet
    2) Select my destination sheet
    3) Hide everything other than my destination sheet

    Now what I'm looking for but can't seem to get is a way to instead do:

    1) Un-hide all sheets between "DestinationSheet1" and "DestinationSheetX"
    2) Select "DestinationSheet1"
    3) Hide everything other than the sheets between "DestinationSheet1" and "DestinationSheetX"

    The reason is I now need to hide and un-hide larger groups of sheets that are going to be a real pain to maintain if named individually, but will always fall between a static start and end sheet.

    Any help would be greatly appreciated! Many thanks,

    Q.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to un-hide all sheets between two sheets

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Cardiff
    MS-Off Ver
    2013
    Posts
    10

    Re: VBA to un-hide all sheets between two sheets

    You sir are a legend, that's perfect, thank you so much!

+ 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. Hide all sheets ("all sheets" not constant) except two
    By deucejmp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-16-2011, 05:00 PM
  2. Hide Sheets
    By Chandrashekhar in forum Excel General
    Replies: 4
    Last Post: 07-30-2008, 01:02 AM
  3. Hide Sheets
    By DGA2008 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-12-2008, 01:24 PM
  4. Hide all Sheets
    By Roba1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-07-2006, 09:45 AM
  5. Hide all sheets but selected sheets - an example
    By aztecbrainsurgeon@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2006, 01:35 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