View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Pouplating a list from an array

Do you mean as in Create a List, a feature that was added in xl2003. Or do
you mean just place the values in the worksheet.

If a 2D array in the variable v as an example


rw = Ubound(v,1) - lbound(v,1) + 1
col = Ubound(v,2) - lbound(v,2) + 1

Range("A1").Resize( rw, col).Value = v


for a 1D array to be entered in a column

rw = Ubound(v,1) - lbound(v,1) + 1

Range("A1").Resize(rw,1).Value = Application.Transpose(v)

In xl2000 and earlier, use of transpose limits the size of the array to 5461
elements

http://support.microsoft.com/kb/177991/en-us

. XL: Limitations of Passing Arrays to Excel Using Automation



--
Regards,
Tom Ogilvy


"thiaga" wrote in message
oups.com...
I have an array(Variant) of values.
I would like to show them as a list in the excel worksheet.
How do i do this? I am a newbie!!