Boa noite!!
Tente...
Fonte: http://www.cpearson.com/excel/OnTime.aspx
Public RunWhen As Double
Public Const cRunIntervalSeconds = 5
Public Const cRunWhat = "TheSub"
Sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
Schedule:=True
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
Schedule:=False
End Sub
Sub TheSub()
MsgBox "Agora são " & Time & "."
StartTimer
End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 02/03/2014 6:03 pm