Q
QuocAnh
Hello All,
I have a strange situation and I hope that this is the
appropriate forum.
I want to extract a column of data (10,000 elements) into
a 1-dimensional array using the following lines of code:
* Dim rTmp1 As Range
* Dim vTmp1() As Variant
* Set rTmp1 = Range(.Cells(1, 1), .Cells(5461, 1))
* vTmp1 = Application.WorksheetFunction.Transpose
(rTmp1.Value)
The max number of elements I can get is "5461" (don't know
why this number?), any number larger than this, the error
message is: "Type mismatch"
Has anyone ran across such a situation? and how did you
get around it?
fyi, I know that I can get all 10,000 elements if I use
the following line:
* vTmp1 = rTmp1.Value
Unfortunately, this gives me a 2-dimensional array, in the
following form: vTmp(i,1), which screws up my subsequent
calc's, and I don't really want to go back and recode the
calculation functions.
Thanks in advance
Anh.
I have a strange situation and I hope that this is the
appropriate forum.
I want to extract a column of data (10,000 elements) into
a 1-dimensional array using the following lines of code:
* Dim rTmp1 As Range
* Dim vTmp1() As Variant
* Set rTmp1 = Range(.Cells(1, 1), .Cells(5461, 1))
* vTmp1 = Application.WorksheetFunction.Transpose
(rTmp1.Value)
The max number of elements I can get is "5461" (don't know
why this number?), any number larger than this, the error
message is: "Type mismatch"
Has anyone ran across such a situation? and how did you
get around it?
fyi, I know that I can get all 10,000 elements if I use
the following line:
* vTmp1 = rTmp1.Value
Unfortunately, this gives me a 2-dimensional array, in the
following form: vTmp(i,1), which screws up my subsequent
calc's, and I don't really want to go back and recode the
calculation functions.
Thanks in advance
Anh.