Minimum time per interval

E

Edmund Seet

'The below sample line represents 2 minutes interval
Public Const cRunIntervalSeconds = 120 ' two minutes

I'm just curious what's the "minimum" interval that VBA
can accept?
0.1 sec?
0.01 sec?
0.001 sec?
0.0001 sec?
0.00001 sec or something else?

TIA
Edmund Seet
 
R

Rocky McKinley

Hi Patrick,

Have you any example code of how to get Excel to use .001 seconds in Vb such
as using the "Application.Wait" method.

Thanks,
Rocky McKinley
 
C

Chip Pearson

Rocky,

Use the Sleep API call for smaller time interval. It takes as its argument
the number of milleseconds.

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Test()
Sleep dwMilliseconds:=100&
End Sub
 
R

Rocky McKinley

Thanks Chip that works great! Where can I find out more about API calls so
I can utilize more of their powers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top