Tema: favor ayuda
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/03/2011, 10:19
jaml_84
 
Fecha de Ingreso: diciembre-2010
Mensajes: 11
Antigüedad: 13 años, 5 meses
Puntos: 0
favor ayuda

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