Cronometro para excel

Quiero crear un cronometro que vaya de 5 min hacia atrás y cuando quede en 0.0 me bloque una celda

1 respuesta

Respuesta
1
'DEBES USAR UN MACRO QUE SE LLAME A SÍ MISMA CADA SEGUNDO. EJ:
Public total_segundos As Integer
Public salir As Boolean
Sub decremento()
If (Not total_segundos > 0) And salir <> True Then
    total_segundos = 10 'cinco minutos
    If Not salir Then
        Application.OnTime Now + TimeValue("00:00:01"), "decremento"
    End If
Else
    If salir <> True Then
        Application.OnTime Now + TimeValue("00:00:01"), "decremento"
    Else
        Cells(1, 1) = 0
        salir = False
        Application.Run "Bloquearcelda"
        Exit Sub
    End If
End If
Cells(1, 1) = Format(total_segundos / 86400, "hh:mm:ss")
total_segundos = total_segundos - 1
If total_segundos = 0 Then salir = True
End Sub
Sub Bloquearcelda()
'acá tu código para bloquear la celda o hacer lo que tengas que hacer
MsgBox "Fin"
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas