none
Show/Hide Sheet with a drop down selection RRS feed

  • Question

  • Hello -

    Does anybody know if there is a way to show/hide a sheet based on a drop down menu selection?

    Example:

    If Multi-Family was selected (below image) I would like it to show (unhide) Sheet1? Can this be done?

    Any ideas would be greatly appreciated. Thank you in advance for your time :)

    Wednesday, February 15, 2017 8:22 PM

Answers

  • Hi

    This should do it. You will need to adjust the range, I'm using B2 for a Drop Down list

    and the macro is in sheet2

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Range("B2") = "Multi-Family" Then
            Sheets("sheet1").Visible = False
        Else
            Sheets("sheet1").Visible = True
        End If
    End Sub


    Cimjet

    • Marked as answer by rstreets2 Thursday, February 16, 2017 1:27 AM
    Wednesday, February 15, 2017 11:44 PM

All replies

  • Hi

    This should do it. You will need to adjust the range, I'm using B2 for a Drop Down list

    and the macro is in sheet2

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Range("B2") = "Multi-Family" Then
            Sheets("sheet1").Visible = False
        Else
            Sheets("sheet1").Visible = True
        End If
    End Sub


    Cimjet

    • Marked as answer by rstreets2 Thursday, February 16, 2017 1:27 AM
    Wednesday, February 15, 2017 11:44 PM
  • Most excellent! You are genius! Works like a charm! Much thanks for your assistance Cimjet!
    Thursday, February 16, 2017 1:27 AM
  • You're welcome

    Thanks for the feedback.

    John


    Cimjet

    Thursday, February 16, 2017 3:04 AM