Sub LaunchMacroAfterDelay()
Dim RunTime As Date, Start, Fin, DelayTime
Start = 5
DelayTime = 1
Fin = Start + DelayTime
RunTime = Now + TimeValue("00:00:" & Start)
Application.OnTime RunTime, "MaMacroDeb"
RunTime = Now + TimeValue("00:00:" & Fin)
Application.OnTime RunTime, "MaMacroFin"
End Sub
Sub MaMacroDeb()
With ActiveSheet.Shapes("Triangle1")
.Fill.ForeColor.RGB = RGB(255, 0, 0)
End With
End Sub
Sub MaMacroFin()
With ActiveSheet.Shapes("Triangle1")
.Fill.ForeColor.RGB = RGB(0, 255, 0)
End With
End Sub