Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'Tempo de x millisecondes
Sub aller_COMPLEMENT_XL2007()
'Stop
'attente = 1: newHour = Hour(Now()): newMinute = Minute(Now()): newSecond = Second(Now()) + attente: waitTime = TimeSerial(newHour, newMinute, newSecond): Application.Wait waitTime
Sleep 10
SendKeys ("%m"), True
'attente = 1: newHour = Hour(Now()): newMinute = Minute(Now()): newSecond = Second(Now()) + attente: waitTime = TimeSerial(newHour, newMinute, newSecond): Application.Wait waitTime
Sleep 10
SendKeys ("2{Esc}{esc}"), True
End Sub
Sub aller_COMPLEMENT_XL2010()
'Stop
'attente = 1: newHour = Hour(Now()): newMinute = Minute(Now()): newSecond = Second(Now()) + attente: waitTime = TimeSerial(newHour, newMinute, newSecond): Application.Wait waitTime
Sleep 10
SendKeys ("%y"), True
'attente = 1: newHour = Hour(Now()): newMinute = Minute(Now()): newSecond = Second(Now()) + attente: waitTime = TimeSerial(newHour, newMinute, newSecond): Application.Wait waitTime
Sleep 10
SendKeys ("223{Esc}{esc}"), True
End Sub