• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hide Combi Box - Form Control

I have 3 Combi Boxes on my sheet whith different lists attached.

If My_2014 is selected in Combi Box 1 - I would like it to only show Combi box 2, if any other answer is selected show combi box 3. See attached
 

Attachments

  • Warranty date.xlsm
    25.6 KB · Views: 0
Hi lesley,

Copy this macro into a module. After that, right-click on the first drop down, assign macro, and pick Box1Change as the macro. Macro will not run after you make a change.
Code:
Sub Box1Change()
Dim ws As Worksheet
Dim Is2014 As Boolean

Set ws = Worksheets("Sheet1")
'Determine which state to go into
Is2014 = (ws.Range("B6").Value = 2)

Application.ScreenUpdating = False
With ws
    .Shapes("Drop Down 2").Visible = Is2014
    .Shapes("Drop Down 3").Visible = Not (Is2014)
    .Range("13:16").EntireRow.Hidden = Not (Is2014)
    .Range("17:21").EntireRow.Hidden = Is2014
End With
Application.ScreenUpdating = True

End Sub
 
Back
Top