View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob[_17_] Rob[_17_] is offline
external usenet poster
 
Posts: 3
Default Fill a Range with VB SafeArray

Is there a fast way to fill a range of cells with the contents
of a VB SafeArray. I need a shortcut to the following
code :

For i = 0 To UBound(c)
Sheets(sSheet).Cells(i + 2, 6).Value = A(i)
Next i

Also, is there a fast way to fill VB SafeArray with the
contents of a Range. Again, I need a shortcut to the
following code :

ReDim FVE(0 To cds.cbData)
For i = 0 To cds.cbData
FVE(i) = Sheets(sSheet).Cells(i + 2, 20).Value
Next i

Please help and TIA, Robert