Is there an equivalent to Thread.Sleep() in VBA

Johnno Nolan picture Johnno Nolan · Jan 22, 2009 · Viewed 88.8k times · Source

Is there an equivalent to Thread.Sleep() in Access VBA?

Answer

Otávio Décio picture Otávio Décio · Jan 22, 2009
Declare Sub Sleep Lib "kernel32" Alias "Sleep" _
(ByVal dwMilliseconds As Long)

Use the following syntax to call the Sleep function:

Sub Sleep()
Sleep 1000 'Implements a 1 second delay
End Sub