I have the following code:
Option Explicit
Function Wait (Delay As Integer, DispHrglass As Integer)
Dim DelayEnd As Double
DoCmd.Hourglass DispHrglass
DelayEnd = DateAdd("s", Delay, Now)
While DateDiff("s", Now, DelayEnd)>0
Wend
DoCmd.Hourglass False
End Function
This function work when I test it (e.g. type: ?Wait(10,7) and "enter" in the Immediate Window. However, I want to hard code those values into the code shown above.
Where and what should I put in?
Thanks for whatever help you can provide.
Option Explicit
Function Wait (Delay As Integer, DispHrglass As Integer)
Dim DelayEnd As Double
DoCmd.Hourglass DispHrglass
DelayEnd = DateAdd("s", Delay, Now)
While DateDiff("s", Now, DelayEnd)>0
Wend
DoCmd.Hourglass False
End Function
This function work when I test it (e.g. type: ?Wait(10,7) and "enter" in the Immediate Window. However, I want to hard code those values into the code shown above.
Where and what should I put in?
Thanks for whatever help you can provide.