View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default 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