¿¡¿Como detener el reloj en formulario al llegar a los diez segundos en VBA Excel ?
Private Sub Breloj_Click() ' Botón falso
Dim DEPART As Double
Dim Temps As Double
'BTN_Depart.Enabled = False
fin_chrono = 0
DEPART = [now()]
Do While fin_chrono = 0
Temps = [now()] - DEPART
If CheckBox1 = False Then 'CheckBox1
Chrono = WorksheetFunction.Text(Temps, "hh:mm:ss")
'Chrono.Caption = WorksheetFunction.Text(Temps, "hh:mm:ss.00")
Else
Chrono = WorksheetFunction.Text(Temps, "hh:mm:ss")
End If
DoEvents
Loop
End Sub
Sub BFIN_Click() 'Arrete le Chrono
FIN
End Sub
Function FIN()
If fin_chrono = 0 Then
fin_chrono = 1
CheckBox1 = False 'true
'BTN_Depart.Enabled = True
ElseIf CommandButtonA = 1 Then
Chrono = "00:00:00"
End If
End Function
Respuesta de Programar Excel