Hi!

Well, let's see, I have a graph and I populate it with data stored in an myArrayOfValues using FOR loops and

.Cells(x,y). =myArrayOfValues(x,y)

This works. The problem is that it is SLOW. It takes about 1 second to add 100 datapoints. I have up to 3 x 1000 datapoints. I noticed that using

.Range(somerange).value = X

(setting an entire column to a fixed value) was done in a blink of an eye.
Naturally I wanted to do something like

.Range(somerange).value = myArrayOfValues

I get a type mismatch error. So what type is required? I figured Variant so i tried

Dim newArrayOfValues() As Variant

ReDimming it to match myArrayOfValues and then doing a For loop to transfer the values (which are Single) and converting them to Variant with the CVar function

newArrayOfValues(x,y) = CVar(myArrayOfValues(x,y))

The newArrayOfValues contains data of type Single.

So... any ideas?

TIA!

// Paul