en fait mon code est :
Option Explicit
Public running As Boolean
Const UneSec = 1 / 86400
'**************************
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
'************************
Sub compte()
Dim i As Integer
If running Then
Range("A1").Value = Range("A1").Value + UneSec
Application.OnTime Now + TimeValue("00:00:01"), "compte"
'************************
running = Range("B1").Value > Range("A1").Value
Else
Beep 1000, 250
Beep 3000, 100
Beep 1000, 500
'************************
' Attendre 5 secondes
Application.Wait Time + TimeSerial(0, 0, 2)
' Continuer après la pause
Sheets("attente").Select
Application.Wait Time + TimeSerial(0, 0, 5)
UserForm1.Show ( usf s'affiche bien )
ici je voudrai formule pour click automatique sur bouton1 de l'userform1
End If
End Sub