Results 1 to 11 of 11

Hide/Unhide Sheets based on drop down list

Threaded View

  1. #9
    Registered User
    Join Date
    04-03-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    75

    Re: Hide/Unhide Sheets based on drop down list

    Well you had to change some of the specifics like the sheet name and the dropdown cell since you originally specified A1 and Sheet1. I've done it for you below.

    Dim i As Integer
    
    If Sheets("Control Tab").Cells(5, "C").Value2 = "All Divisions" Then
    
        For i = 2 To 5
            Sheets(i).Visible = xlSheetVisible
        Next i
    Else
    
        For i = 2 To 5
            If Sheets(i).Name = Sheets("Control Tab").Cells(5, "C").Value2 Then
                Sheets(i).Visible = xlSheetVisible
            Else
                Sheets(i).Visible = xlSheetHidden
            End If
        Next i
    
    End If
    just copy and paste that below your existing code. (Below "Set Changed = Nothing")

    just tested it and worked fine to hide and unhide sheets.
    Last edited by prjt; 08-31-2016 at 06:06 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hide/unhide sheets based on drop-down menu
    By arindamsenaxa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2016, 10:01 AM
  2. VBA Hide/Unhide individual sheets based on selection in drop down menu
    By igullage in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-05-2015, 08:01 PM
  3. Hide/Unhide cells based on drop-down list
    By Savvy25 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2014, 02:36 AM
  4. Hide-Unhide rows on multiple worksheets based on value of a drop down list
    By clo2peter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-10-2014, 08:32 AM
  5. [SOLVED] hide or unhide rows based on text within a drop down list
    By souimet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 01:32 AM
  6. Unhide or hide sheets based on drop down list value - need help combining these two macros
    By kstrick99999 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2012, 06:07 PM
  7. Hide/unhide columns based on the drop down list value
    By vagif in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2012, 02:13 AM

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