Tema: Semáforo
Ver Mensaje Individual
  #13 (permalink)  
Antiguo 13/06/2006, 15:42
jericosoft
 
Fecha de Ingreso: febrero-2006
Mensajes: 37
Antigüedad: 18 años, 3 meses
Puntos: 0
Espero te sirva


Dim mueve

Private Sub Command1_Click()

mueve = mueve + 1: If mueve > 3 Then mueve = 1

If mueve = 1 Then Shape_Verde.BackColor = vbGreen Else Shape_Verde.BackColor = vbWhite
If mueve = 2 Then Shape_amarillo.BackColor = vbYellow Else Shape_amarillo.BackColor = vbWhite
If mueve = 3 Then Shape_rojo.BackColor = vbRed Else Shape_rojo.BackColor = vbWhite

End Sub
__________________
Jerico