Copy Cells to variant array

  • Thread starter Thread starter Jean-Pierre Bidon
  • Start date Start date
J

Jean-Pierre Bidon

Hie,
I think this question is rather banal but I'm stucked on it.
I would like to copy a range (or a collection of cells) in a variant array.
Using this syntax doesn't work:
---> vaRst = rgCurr(Cells(2, 1), Cells(iRow, iCol))
Need help.
Thanks.

Jean-Pierre Bidon
 
This works for me

Dim rgCurr As Range
Dim vaRst
Dim iRow As Long, iCol As Long

iRow = 3: iCol = 6
Set rgCurr = Range("A1:H10")
vaRst = rgCurr.Cells(2, 1).Resize(iRow - 1, iCol)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Thanks, this works for me to.

Bob Phillips said:
This works for me

Dim rgCurr As Range
Dim vaRst
Dim iRow As Long, iCol As Long

iRow = 3: iCol = 6
Set rgCurr = Range("A1:H10")
vaRst = rgCurr.Cells(2, 1).Resize(iRow - 1, iCol)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Back
Top