Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Dave,
Recently you helped me with dependant drop down lists. You wrote code for me which I modified to suit my circumstances. I now have another sheet which has 3 dropdown lists. 3 being dependent on 2 which in turn is dependent on 1. Below is my modified code but now I need to know how to create the scenario I have stated above. For example in Case 2 the range is ("P2:P6") where in the third list P2 has the range (Q4:Q15) and P3 has a range (Q16:Q19) and so on. I having been trying to work it out but I cant get it to work, can you help me please. Cheers Lynda Option Explicit Sub DD1Change() Dim DD1 As DropDown Dim DD2 As DropDown Dim myRng As Range Set DD1 = ActiveSheet.DropDowns("Drop down 10") Set DD2 = ActiveSheet.DropDowns("Drop down 11") With DD1 Set myRng = Nothing Select Case .ListIndex Case Is = 1: Set myRng = Worksheets("sheet2").Range("P1:P1") Case Is = 2: Set myRng = Worksheets("sheet2").Range("P2:P6") Case Is = 3: Set myRng = Worksheets("sheet2").Range("P7:P7") Case Is = 4: Set myRng = Worksheets("sheet2").Range("P8:P11") Case Is = 5: Set myRng = Worksheets("sheet2").Range("P12:P15") End Select End With If myRng Is Nothing Then MsgBox "Design error!!!!" Else DD2.ListFillRange = myRng.Address(external:=True) DD2.ListIndex = 0 End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
Mr Dave peterson, Please help | Excel Discussion (Misc queries) | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
to Dave Peterson | Excel Discussion (Misc queries) |