+ Reply to Thread
Results 1 to 3 of 3

Unhide / Hide worksheets based on drop down menu value

  1. #1
    Registered User
    Join Date
    09-15-2016
    Location
    Dubai
    MS-Off Ver
    10
    Posts
    0

    Angry Unhide / Hide worksheets based on drop down menu value

    Total novice to this VBA guys so bear with me.

    I want to hide / unhide sheets based on the value the user selects from a drop down menu. There are 3 choices possible in the drop down 1,2,3. The drop down menu is is cell D4
    When "1" is selected I want to unhide sheet "Cat 1 7.5 Months" and keep "Cat 2 10 Months" and "Cat 3 12 Months" hidden
    When "2" is selected I want to unhide sheet "Cat 2 10 Months" and keep "Cat 1 7.5 Months" & "Cat 3 12 Months" hidden
    When "3" is selected I want to unhide sheet "Cat 3 12 Months" and keep "Cat 1 7.5 Months" & Cat 2 10 Months" hidden

    Read lots of post and tried to implement and modify code to suit my needs. All failed so far....

    HELP!! Please

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello Binney,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    09-15-2016
    Location
    Dubai
    MS-Off Ver
    10
    Posts
    0

    Re: Unhide / Hide worksheets based on drop down menu value

    Guys I sorted it eventually


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$D$4" Then

    If Range("D4").Value = "1" Then
    Sh_1.Visible = True
    Sh_2.Visible = False
    Sh_3.Visible = False
    End If

    If Range("D4").Value = "2" Then
    Sh_2.Visible = True
    Sh_1.Visible = False
    Sh_3.Visible = False
    End If
    If Range("D4").Value = "3" Then
    Sh_3.Visible = True
    Sh_1.Visible = False
    Sh_2.Visible = False
    End If
    End If
    End Sub

+ 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/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. [SOLVED] Hide/Unhide Worksheets based on drop down
    By Kerplunk1039 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-09-2015, 04:02 PM
  3. 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
  4. [SOLVED] VBA macro to hide/unhide particular worksheets on selection from drop-down menu
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2014, 09:51 AM
  5. 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
  6. [SOLVED] Hide/Unhide columns in multiple worksheets based on item chosen in a drop down list.
    By Gattaca2014 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-27-2014, 01:31 PM
  7. Replies: 10
    Last Post: 09-17-2013, 10:36 AM

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