i've tried the redim arr(0), redim arr(), and other combinations with no
effect.
a little more detail...
the command button is form level
the array is form level
the array is called in a form level sub
so.. it would seem the array could be seen by the redim statement, but it
doesn't seem to work.
:-(
>
[quoted text clipped - 12 lines]
>
> Don
Don@home.com - 26 Oct 2003 17:43 GMT
I was assuming that your Array() was dynamic...
Is this the case???
Or is it Fixed, ie: Dim YourArray(10) as String
If it is the last case then you have to loop through the array to re-initialize
it..
For x = 0 to 10
YourArray(x) = ""
Next x
>i've tried the redim arr(0), redim arr(), and other combinations with no
>effect.
[quoted text clipped - 24 lines]
>>
>> Don
Have a good day...
Don
Martin Trump - 26 Oct 2003 17:48 GMT
>i've tried the redim arr(0), redim arr(), and other combinations with no
>effect.
Did you *start* with:-
Dim arr()
i.e. make it a dynamic array?
Regards

Signature
Martin Trump
Spider - 26 Oct 2003 17:51 GMT
Yes, the array is dynamic. As follows...
Private r_arr() As Single
> >i've tried the redim arr(0), redim arr(), and other combinations with no
> >effect.
[quoted text clipped - 6 lines]
>
> Regards
Spider - 26 Oct 2003 17:57 GMT
The code holding the array...
Public Sub ResistArr(val As Single, _
arr() As Single)
'in: val value to be summed
'out: arr array cell values
Static i As Integer 'preserve array index between clicks
ReDim Preserve arr(i) 'redim array
arr(i) = val
For i = LBound(arr) To UBound(arr)
frmDC.picResist.Print ; Tab(4); "R" & (i + 1) & _
" " & arr(i)
Next
End Sub
> >i've tried the redim arr(0), redim arr(), and other combinations with no
> >effect.
[quoted text clipped - 6 lines]
>
> Regards
Don@home.com - 26 Oct 2003 18:01 GMT
Your are NOT resetting the Static 'i' any where that I can see so it will always
ReDim it to what ever the last pass set it to...
>The code holding the array...
>
[quoted text clipped - 24 lines]
>>
>> Regards
Have a good day...
Don
Spider - 26 Oct 2003 18:24 GMT
That did it Don...Thanks.
:-)
> Your are NOT resetting the Static 'i' any where that I can see so it will always
[quoted text clipped - 32 lines]
>
> Don