Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 2 column List box

Don't worry have used .list property instead



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 column list Chris Whitehead Excel Discussion (Misc queries) 3 September 1st 09 09:31 PM
Scan column for first of a list Chip Excel Discussion (Misc queries) 1 May 24th 08 05:19 PM
Dropdown List - list item endings not visible if column too narrow AK9955 Excel Discussion (Misc queries) 2 April 27th 07 09:02 AM
How to add different column to a list box using rowsource shirley_kee Excel Discussion (Misc queries) 2 June 29th 06 06:53 AM
column list jose vargas Excel Discussion (Misc queries) 1 March 16th 05 04:19 PM


All times are GMT +1. The time now is 08:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"