View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kieranz[_2_] Kieranz[_2_] is offline
external usenet poster
 
Posts: 55
Default ListBox with 2 Columns

Hi Gerry. Many thks for your reply. Being a newbie and lost on arrays
though i am reading about them
How do i dim the arrays and then apply to populate the listbox with 2
col.
Thks
K
Ps did not have internet connection.

I suggest using an array to collect your data, THEN populate the
listbox from the array as this would be the quickest way.

You also need to set the ColumnCount property for the number of cols.

To add individual items you need to use the row/col index like this...

* ListBox1.List(0, 0) = <col1 data
* ListBox1.List(0, 1) = <col2 data

To 'dump' a 2D array into the listbox in one step...

* ListBox1.List = myArray

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc