Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
2 column List box
I'm trying to fill a 2 column list box.
I am not referencing the second column correctly as the results appear in the same column. I have had a good look through some stuff but can't work out where I'm going wrong. Thanks in advance ------------------ With Worksheets("MD Catch " & Area_Selection.Which_Catchment.ListIndex + 1) 'The range is row 6, column 1 , ("a6:b,end")then find end of columns by codes Set rng = Range(.Cells(6, 1 + col), .Cells(Rows.Count, 2 + col).End(xlUp)) vArr = rng.Value 'select form "Area-Selection and clear drop down box " ZoneDefinition" Area_Selection.ZoneDefinition.Clear 'then retrieve the data j = -1 For i = LBound(vArr) To UBound(vArr) j = j + 1 'then paste list data into form "Area-Selection and drop down box "ZoneDefintion" Area_Selection.ZoneDefinition.ColumnCount = 2 Area_Selection.ZoneDefinition.AddItem vArr(i, 1) Area_Selection.ZoneDefinition.List(j, i) = rng(i, 1).Row Area_Selection.ZoneDefinition.AddItem vArr(i, 2) Area_Selection.ZoneDefinition.List(j, i) = rng(i, 2).Row Next End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
2 column List box
Don't worry have used .list property instead
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2 column list | Excel Discussion (Misc queries) | |||
Scan column for first of a list | Excel Discussion (Misc queries) | |||
Dropdown List - list item endings not visible if column too narrow | Excel Discussion (Misc queries) | |||
How to add different column to a list box using rowsource | Excel Discussion (Misc queries) | |||
column list | Excel Discussion (Misc queries) |