Sub Basic Extensions Class

DoEventsSafe

Pause for a short period of time, but do NOT call the DoEvents function because Microsoft strongly recommends against using DoEvents within In-process OLE Servers (such as Entisoft Tools).

Signature (Visual Basic / VBA)

Public Sub DoEventsSafe()

Code Example

    Dim lngTry As Long
    For lngTry = 1 To 10000000
        Dim dblResult As Double
        dblResult = Sqr(lngTry)
        ' ... Other heavy-duty processing here.
        DoEventsSafe
    Next lngTry

Notes & Version History

Details This function pauses for 10 milliseconds (.01 seconds) but does NOT call the DoEvents statement.
v1.3 Change Removed 16-bit support from this function.