PDA

View Full Version : Single row listbox query



mdmackillop
10-15-2006, 10:35 AM
Why does this code not work if the array contains only two elements?

ListBox1.List = Application.WorksheetFunction.Transpose(arr)

see http://vbaexpress.com/forum/showthread.php?t=9837

Bob Phillips
10-15-2006, 03:39 PM
I'm not getting trhis Malcolm. I can transpose an array of (0 To 1) and (0 To 1,0).

mdmackillop
10-15-2006, 04:31 PM
Hi Bob,
The array may be transposing, but the listbox does not fill correctly. See this revised demo file.

Ken Puls
10-15-2006, 10:02 PM
Hi Malcolm,

I ran into this recently as well. I ended up manually transposing my array to fix the issue. TonyJollans posted back about using the listbox.column to take care of it. I didn't end up going that way, but the thread is here (http://www.vbaexpress.com/forum/showthread.php?t=9550).