Why is it that when I write the following code I get Subscript out of range on the penultimate line
Dim OldAr()
With Sheets("Sheet1")
x=.range("A1").CurrentRegion.rows.Count
reDim OldAr(x)
OldAr = .Range(.Cells(1,1), .Cells(x,1)).value
.Range("C2").Value = OldAr(3)
End With
But when I write the code
Dim OldAr()
With Sheets("Sheet1")
x = .range("A1").currentRegion.Rows.count
Redim OldAr(x)
For a = 0 to x-1
OldAr(a) = .Ranhe("A1").Offset(a,0).Value
Next a
.Range("C2").Value = OldAr(3)
End with
All works well
I have used the first formulation many times without problem before. I must be doing something different but I cannot see what
John