Computer Science Canada a little help with a for loop |
Author: | Drewbie [ Fri Jan 26, 2007 9:22 pm ] |
Post subject: | a little help with a for loop |
im tyring to get this loop to work but cant quite figure it out Dim i As Integer For i = 1 To 6 Label(i).Caption = Int(Rnd * 10 + 1) Next what i want it to do i to cycle threw the labels on my form and generate a number in each one but i dont know how to get it to switch from label to label |
Author: | cool dude [ Fri Jan 26, 2007 9:49 pm ] |
Post subject: | Re: a little help with a for loop |
are your labels made a control array? Edit: i just tried your code which is correct by making a control array and it works. so all you have to do is make a control array |