Visual Basic - ayuda por fa

Life is soft - evento anual de software empresarial
 
Vista:

ayuda por fa

Publicado por jose antonio (3 intervenciones) el 25/03/2011 20:03:02
muy buenas mire que estoy realizando un programa sobre la quinela y utuizo el siguiente codigo para que se seleccione 6 check automaticamente con el siguiente codigo
Private Sub Command2_Click()
Dim a As Integer
Dim i As Integer
i = 0

Do
m = CInt(Int((48 * Rnd) + 1))
chk0(m).Value = vbChecked
i = i + 1

If chk0(m) = 49 Then
m = m - 1
End If

If chk0(m).BackColor = vbGreen Then

m = m - 1
End If
'Label1.Caption = m
Loop Until (i = 6)
If i = 6 Then
Command2.Enabled = False
a = 0
Do
chk0(a).Enabled = False
a = a + 1
Loop Until (a = 50)


End If
End Sub


pero al momento de aplicarlo no solo escoge 6 sino que se aplica a 5 check o a veces a 7
me podrian dar alguna forma de corregir ese error o evitar y que solo se selecciones 6 check

gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder