Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That array returned by the .list property (for a single column) is a 2 dimensional array.
So you have to specify the column as well as the row... Msgbox arrVariant(0, 0) -- Jim Cone San Francisco, USA http://www.officeletter.com/blink/specialsort.html "Matt" wrote in message Thanks Jim but oddly the code below didn't work in 2002 for me...probably missed something dumb Private Sub CommandButton1_Click() Me.ListBox1.AddItem Me.TextBox1 End Sub Private Sub CommandButton2_Click() Dim arrVariant As Variant arrVariant = Me.ListBox1.List MsgBox arrVariant(0) ' type 13 err End Sub TIA, Matt Jim Cone wrote: Matt, With a small change...remove "array". Dim arrA As Variant arrA = Me.ListBox1.List -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Matt" wrote in message ups.com... Just curious to know if it is possible to convert a listbox of values to an array, such as: Dim arrA as variant with me.listbox1 arrA = array(.list) end with Seems like functionality that would make sense. It's a pain to do the for i = 0 to .listcount - 1 thing to create an array. TIA, Matt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a list to an array | Excel Programming | |||
Passing Byte array to DLL | Excel Programming | |||
Passing array from 2nd sub back to first sub | Excel Programming | |||
PASSING an array to a sub in VBA | Excel Programming | |||
Passing array to a function | Excel Programming |