Verilen kodu belirtilen saniye kadar beklettikten sonra çalıştıran VBA kodudur.
Option Explicit
Private Declare Function SleepEx Lib "kernel32" ( _
ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
Sub OrnekKullanim()
SleepEx 2000, False
MsgBox "Bu mesaj, iki saniye bekletildikten sonra gösterildi."
End Sub