J
Jag Man
What is the most efficient way to load data from a sheet range into an array
so I can
pass the data to a DLL function? And, to transfer the results back into
another sheet range?
That is, I want to do something like this
Sub mySub
inargs(0) = Range("x").value
inargs(1) = Range("y").value
inargs(2) = Range("z").value
ec = theDllFunction(inargs(0), outargs(0)
Range("a").Value = outargs(0)
Range("b").Value = outargs(1)
Range("c").Value = outargs(2)
End
The above works, but if the cells named x, y, z, and those named a, b, c,
are in a contiguous ranges it seems there must be
a more efficient way to do this.
TIA
Ed
so I can
pass the data to a DLL function? And, to transfer the results back into
another sheet range?
That is, I want to do something like this
Sub mySub
inargs(0) = Range("x").value
inargs(1) = Range("y").value
inargs(2) = Range("z").value
ec = theDllFunction(inargs(0), outargs(0)
Range("a").Value = outargs(0)
Range("b").Value = outargs(1)
Range("c").Value = outargs(2)
End
The above works, but if the cells named x, y, z, and those named a, b, c,
are in a contiguous ranges it seems there must be
a more efficient way to do this.
TIA
Ed