Hi guys,
I have a code which uses offset.resize to get a full range of cells but each time i try to define that range as an array - I keep getting the error 'Object doesn't support this property or method'.
I made sure that the array has the correct dimensions, I was wondering if someone could point me in the right direction as to how I can use the offset resize properties together to define my array?
'######################################################################
dim prefrnt() as variant
redim prefrnt(1 to 21, 1 to 21)
For i = 1 To 700
If StrComp(ws8.Cells(i, 1), Left(frntfut, Len(frntfut) - 4), vbTextCompare) = 0 Then
For j = 1 To 100
If ws8.Cells(i + 1, j) = "Futures" Then
prefrnt = ws8.Cells(i + 1, j).Offset(1, 1).Resize(21, 21).Values <<<<< code gets stuck here
'######################################################################
Any help would be much appreciated!
Cheers,
Nilesh
I have a code which uses offset.resize to get a full range of cells but each time i try to define that range as an array - I keep getting the error 'Object doesn't support this property or method'.
I made sure that the array has the correct dimensions, I was wondering if someone could point me in the right direction as to how I can use the offset resize properties together to define my array?
'######################################################################
dim prefrnt() as variant
redim prefrnt(1 to 21, 1 to 21)
For i = 1 To 700
If StrComp(ws8.Cells(i, 1), Left(frntfut, Len(frntfut) - 4), vbTextCompare) = 0 Then
For j = 1 To 100
If ws8.Cells(i + 1, j) = "Futures" Then
prefrnt = ws8.Cells(i + 1, j).Offset(1, 1).Resize(21, 21).Values <<<<< code gets stuck here
'######################################################################
Any help would be much appreciated!
Cheers,
Nilesh