Discussion Locked

Running multiple Access queries

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have 10 macros that I need to run one after the other. However, I would like for one to run and wait maybe 1 minutes before it runs the next or wait for a keyboard command before it runs the next. What is the best way to do this?

1 reply

by eschlangen

One simple way to wait for a specified amount of time is this:

Public Sub Pause(iSeconds As Integer)
Dim dStart As Date

dStart = Now()
Debug.Print dStart
Do Until DateDiff("s", dStart, Now()) >= iSeconds
Loop

End Sub

You should be able to do something similar for a keypress, I haven't tried. Hope this helps!

This discussion is closed to new replies.