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

后端 未结 8 1286
孤街浪徒
孤街浪徒 2020-12-01 13:38

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

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 14:26

    A couple of amendments are required to get the code to work. The code below is the corrected version.

    Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
    
    Sub SleepVBA() 
    Sleep 1000 'Implements a 1 second delay 
    End Sub 
    

提交回复
热议问题