<-- Previous || Up || Next -->

Beep Every Nth Call Function
Basic Extensions Class

Public Function BeepEveryNthCall( _
    Optional ByVal vNthCall As Long = 0 _
    ) As Boolean

Function Beeps every Nth time that it is called.
For example, beep once every 500 times that the function is called.

    ' Should beep 20 times.
    Dim lngCur As Long
    For lngCur = 1 To 10000
       Dim varIgnore As Variant
       varIgnore = BeepEveryNthCall(500)
       Dim dblTemp As Double
       dblTemp = Sqr(lngCur)
    Next lngCur
See also:
    TrueEveryNCalls Function
    Beep Statement (Visual Basic)
vNthCall: The number of calls to this function before the function beeps. vNthCall defaults to 0 (zero) if it is missing.
Return Value: Function returns True if vNthCall is >= 0 (greater than or equal to zero) and it returns False otherwise.
v1.3 Change: Changed the name of the argument, changed its datatype from Variant to Long, and specified a default value for it.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.