Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate multi-column list in worksheet not in a UserForm
I have simple list box on the sheet of an Excel (not on a userForm).
I want to add two column of information. I set the multi-column value to 2. How can I add values to 2nd column? Adding values to first column works fine such as: lstTest.list = array("a","b","c") but, adding value to second column doesn't work: lstTest.list(0,1) = array("a","b","c") And, I noticed that RowSource property is not there either, any one know why? Thanks, Afzal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate multi-column list in worksheet not in a UserForm
Dim myArr(1 To 3, 1 To 2)
myArr(1, 1) = "a1" myArr(1, 2) = "a2" myArr(2, 1) = "b1" myArr(2, 2) = "b2" myArr(3, 1) = "c1" myArr(3, 2) = "c2" lstTest.List = myArr HTH, Bernie MS Excel MVP "Afzal" wrote in message ... I have simple list box on the sheet of an Excel (not on a userForm). I want to add two column of information. I set the multi-column value to 2. How can I add values to 2nd column? Adding values to first column works fine such as: lstTest.list = array("a","b","c") but, adding value to second column doesn't work: lstTest.list(0,1) = array("a","b","c") And, I noticed that RowSource property is not there either, any one know why? Thanks, Afzal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate multi-column list in worksheet not in a UserForm
Thanks Deitrick.
I found out why the other columns weren't showing. I had placed 1 pt, 1 pt in ColumnWidths property assuming inches or cm to be the default unit of measurement but it turns out 72 pt;72 pt is equivalent to an inch. "Bernie Deitrick" wrote: Dim myArr(1 To 3, 1 To 2) myArr(1, 1) = "a1" myArr(1, 2) = "a2" myArr(2, 1) = "b1" myArr(2, 2) = "b2" myArr(3, 1) = "c1" myArr(3, 2) = "c2" lstTest.List = myArr HTH, Bernie MS Excel MVP "Afzal" wrote in message ... I have simple list box on the sheet of an Excel (not on a userForm). I want to add two column of information. I set the multi-column value to 2. How can I add values to 2nd column? Adding values to first column works fine such as: lstTest.list = array("a","b","c") but, adding value to second column doesn't work: lstTest.list(0,1) = array("a","b","c") And, I noticed that RowSource property is not there either, any one know why? Thanks, Afzal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find a value with multi-column, multi-record list | Excel Worksheet Functions | |||
Populate list box with multi-dimensional array | Excel Programming | |||
Multi Column UserForm ListBox | Excel Programming | |||
How to populate a multi-column activeX listbox on a spreadsheet with an ADO recordset | Excel Programming | |||
Extract values from a multi-select multi-column list-box | Excel Programming |