Hi,
I used a variant to copy a whole range of cells and store them. I was wondering if there was any way to redimension or convert it into an array of doubles. Example:
dim myvariant as variant
dim convertedarray() as double
myvariant = range("A1
10").value
'this is where i would like to convert it into an array of doubles
'something like
convertedarray = cdbl(myvariant)
'or maybe
convertedarray = split(myvariant)
'or perhaps
x = 0
for each myelement in myvariant
convertedarray(x) = cdbl(myelement)
next
i have used similar approaches to these but none work. Any ideas or maybe something similar as something that i already tried to do?
thanks
I used a variant to copy a whole range of cells and store them. I was wondering if there was any way to redimension or convert it into an array of doubles. Example:
dim myvariant as variant
dim convertedarray() as double
myvariant = range("A1
'this is where i would like to convert it into an array of doubles
'something like
convertedarray = cdbl(myvariant)
'or maybe
convertedarray = split(myvariant)
'or perhaps
x = 0
for each myelement in myvariant
convertedarray(x) = cdbl(myelement)
next
i have used similar approaches to these but none work. Any ideas or maybe something similar as something that i already tried to do?
thanks