No, I don't think I can explain that any plainer.
I've tried this code: If not Yourlabelname(x) exists Then GoTo exitline2
But vb6 doesn't recongnize "EXISTS" as vbnet does
I am assumming Yourlabelname is a control array of labels?
If (Not Yourlabelname) = -1 Then 'array does not exist
Are you trying to see if the array Element
It's really hard to understand what you're trying to do anyway as the code example you posted doesn't make any sense to me.
Do Until x = Yourlabelname.Count
x = x + 1
If Yourlabelname(x).Left = Label4(x).Left And Yourlabelname(x).Top = Label4(x).Top Then busy(x) = True
'The following line is going to execute everytime regardless of the above lines results.
' so busy(x) will always be False
exitline2: busy(x) = False
I don't know what you mean by
By the way if you think of a better way to make cases without using tonnes of labels tell me
cases of what?
I'm guessing what you're trying to do is something more like this?
Private Sub timbusy_Timer()
Dim x As Integer
For x = 1 To Yourlabelname.Count
If Yourlabelname(x).Left = Label4(x).Left And Yourlabelname(x).Top = Label4(x).Top Then
busy(x) = True
busy(x) = False
Last edited by Agent707; 08-04-2004 at 08:25 PM.