J
John T Ingato
Hers a simple one... for you!
I have a userform with one listbox in it : Userform1.listbox1 See simple code below
If I set the range to A1:A5 it shows all 5 values in the listbox.
If I set the rowsource property to myrange A1:E1, the list box only displays 1 cell... A1
There is not a colsource propety.
Can't I set the source of a listbox to a horizontal range selection? (without tranfering it between an array)
****************************************************
Sub test()
Dim Myrange As Range
Set Myrange = Range("A1", "E1")
Myrange = 0 ' fill 5 cell in 1 row with Zeros
UserForm1.ListBox1.RowSource = Myrange.Address
UserForm1.Show
End Sub
I have a userform with one listbox in it : Userform1.listbox1 See simple code below
If I set the range to A1:A5 it shows all 5 values in the listbox.
If I set the rowsource property to myrange A1:E1, the list box only displays 1 cell... A1
There is not a colsource propety.
Can't I set the source of a listbox to a horizontal range selection? (without tranfering it between an array)
****************************************************
Sub test()
Dim Myrange As Range
Set Myrange = Range("A1", "E1")
Myrange = 0 ' fill 5 cell in 1 row with Zeros
UserForm1.ListBox1.RowSource = Myrange.Address
UserForm1.Show
End Sub