View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default multicolumn listbox - 2002 to 97

Hi George,

To enable xl97 compatabilitty, try changing:

Dim MyArray()


to:

Dim MyArray as Variant


Prior to xl2k, I beleive that an array could only be assigned to a variant,
not to a dynamic variant array.


---
Regards,
Norman



"George J" wrote in message
...
The code below is part of a macro i am using. In Xl2000 it works fine, but
cannot get it to work in XL97 - need help.


Call UpdateSort
x = Range("I65536").End(xlUp).Row
'creates multicolumn listbox
Dim MyArray()
MyArray = Range("I2:J" & x)
ListBox1.ColumnWidths = "50;200"
Me.ListBox1.List = MyArray


columns i:k are sorted into numerical order by the UpdateSort macro
i then want listbox1 to show the data in I2:Jx with x being a variable
range.
I have the listbox set to 2 columns in the properties, but cannot see how
to
get this to work in XL97

Any help appreciated.
George