VBOffice

Pause Code Execution

In Excel there's a function to stop the code execution for a determined time, which is missing in Outlook. See how to use the Sleep function of the Win32 API.

Last modified: 2007/07/20 | Accessed: 52.208  | #56
◀ Previous sample Next sample ▶

In Excel there's a function to stop the code execution for a determined time, in Outlook there isn't such a function. But you can use the Sleep function of the Win32 API, of course.


tip  How to add macros to Outlook
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliSeconds As Long)

Public Sub Test()
  Sleep 3000
  MsgBox "Hello"
End Sub
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.
email  Send a message