Sub test()
Intervalle = Now + TimeValue("00:00:01")
Application.OnTime Intervalle, "Test"
Dim MonWav As String
MonWav = Range("aa16") '... chemin et nom à adapter
ExecuteExcel4Macro ("CALL(""winmm"",""PlaySoundA"",""JCJJ"",""" & MonWav & """, " & 0 & "," & &H1 & ")")
If ActiveSheet.Shapes("droite").Visible = True Then
With ActiveSheet.Shapes("tonaledroite")
Set Var = ActiveSheet.Shapes("tonaledroite")
If .Visible = msoTrue Then
.Visible = msoFalse
Else
.Visible = msoTrue
End If
End With
End If
End Sub
Sub Depart()
Intervalle = Now + TimeValue("00:00:01")
Application.OnTime Intervalle, "test"
End Sub
Sub Arret()
Application.OnTime Intervalle, "test", , False
End Sub