Public Sub CbInicio_Click()
Dim secjuego(100) As Integer
Dim i As Integer
Dim puntaje As Integer
Dim continuar As Integer
Dim secusuario(100) As Integer
puntaje = 0
For i = 1 To 100
secjuego(i) = CInt(Int((4 * Rnd()) + 1))
Application.Range("B1").Offset(i, 0).Value = secjuego(i)
Next i
Do
puntaje = puntaje + 1
For i = 1 To puntaje
DoEvents
Select Case secjuego(i)
Case Is = 1
CbVerde.Picture = IVerde.Picture
Application.Wait (Now + TimeValue("00:00:01"))
CbVerde.Picture = IVerdeN.Picture
Case Is = 2
CbAmarillo.Picture = IAmarillo.Picture
Application.Wait (Now + TimeValue("00:00:01"))
CbAmarillo.Picture = IAmarilloN.Picture
Case Is = 3
CbAzul.Picture = IAzul.Picture
Application.Wait (Now + TimeValue("00:00:01"))
CbAzul.Picture = IAzulN.Picture
Case Is = 4
CbRojo.Picture = IRojo.Picture
Application.Wait (Now + TimeValue("00:00:01"))
CbRojo.Picture = IRojoN.Picture
End Select
Next i
'AQUI ESTA MI ERRO NO PUEDO DAR CLICK A LOS BOTONES EN MEDIO DE LA EJECUCION DE OTRO Y QUIERO SABER SI ES POSIBLE HACERLO
Application.Wait (Now + TimeValue("00:00:01"))
For i = 1 To puntaje
DoEvents
secusuario(i) = 0
If (CbVerde = True) Then
secusuario(i) = Application.Range("A1").Value
Else
If (CbAmarillo = True) Then
secusuario(i) = Application.Range("A2").Value
Else
If (CbAzul = True) Then
secusuario(i) = Application.Range("A3").Value
Else
If (CbRojo = True) Then
secusuario(i) = Application.Range("A4").Value
End If
End If
End If
End If
Next i
For i = 1 To puntaje
DoEvents
If secusuario(i) = secjuego(i) Then
Else
continuar = 1
End If
Next i
TbPuntaje.Text = Str(puntaje)
Loop While (continuar = 0)
If puntaje = 1000 Then
MsgBox "Felicidades superaste a Simon"
Else
MsgBox "Perdiste"
End If
TbPuntaje.Text = "00"
End Sub