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

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

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

8条回答
  •  猫巷女王i
    2020-12-01 14:18

    I use this in Excel and it works great:

    Application.Wait DateAdd("s", 1, Now())
    

    DateAdd() is a function that set a time, relative to Now() (in this case - you can use other values as your argument), "s" is the time measure (seconds in this case), and the increment is 1. So here, the function call is telling the application to wait 1 second.

    See also for more detail about the use of the DateAdd function.

提交回复
热议问题