N
Nick_F
Hi,
I can't get this code to work, I get the first element of the array
pasted to the range when I want all the elements to be pasted to the
range. I took this code from another script I wrote which works fine.
I just can't understand what is happening. When I check the locals
window the expected values are in the array.
So the array might contain 2, 4, 6, ... but the range will contain
only 2, 2, 2, ....
Sub work_dammit()
Freq = Range("L1").Value
j = Application.Count(Range("B:B"))
ReDim Array_Time(1 To j) As Variant
For i = 1 To j
Array_Time(i) = i * SRM_Freq
Next i
Range("A1:A" & j).Value = Array_Time
End Sub
Can anyone enlighten me.
thanks
nick
I can't get this code to work, I get the first element of the array
pasted to the range when I want all the elements to be pasted to the
range. I took this code from another script I wrote which works fine.
I just can't understand what is happening. When I check the locals
window the expected values are in the array.
So the array might contain 2, 4, 6, ... but the range will contain
only 2, 2, 2, ....
Sub work_dammit()
Freq = Range("L1").Value
j = Application.Count(Range("B:B"))
ReDim Array_Time(1 To j) As Variant
For i = 1 To j
Array_Time(i) = i * SRM_Freq
Next i
Range("A1:A" & j).Value = Array_Time
End Sub
Can anyone enlighten me.
thanks
nick