Run-time error 340 - Control array element '4' doesn't exist
>I'm using VB6 (SP3) .
>I used bound control array on my form. At time, I got the error "Control
>array element "4" doesn't exist although element 4 is on the form. I
>all the array elements, they are all in sequence and I did'nt miss any
How did you check it (it's possible you made an error)?
>Sometime this error comes on Element "5" sometime on "6" and most of the
>time, it didn't show the error.
Are you loading and unloading elements at run time?
>I don't know what's going on. Should I don't use control array on my form.
This would only be reasonable if there were a problem with control
arrays. There isn't, and control arrays are necessary to reduce resource
use in VB. The reasonable assumption is that there is something
wrong in the forms and code you have written.
Just a reminder, control arrays are zero indexed, and never contain
gaps in the sequence. If you unload element 3, for example, element
4 immediately becomes element 3, even within a loop. When
removing elements from a control array, therefore, start at the
last element and work to the front.
If this doesn't help, post some code.