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

True Every N Calls Function
Basic Extensions Class

Public Function TrueEveryNCalls( _
    Optional ByVal vNthCall As Variant _
    ) As Boolean

Function returns True every Nth time that it is called.

Examples:
    TrueEveryNCalls(0) = True ' #1; Reset counter.
    TrueEveryNCalls(3) = False
    TrueEveryNCalls(3) = False
    TrueEveryNCalls(3) = True
See also:
    TrueEveryNSeconds Function
    BeepEveryNthCall Function
vNthCall: The number of calls to this function before the function returns True. vNthCall defaults to 0 (zero) if it is missing or Null or cannot be fixed up to a number, meaning that the function will return True and the counter will be reset as in example #1.
Return value: Function returns True if vNthCall is missing, Null, cannot be fixed up to a number, or is <= 0 (less than or equal to zero), Otherwise, if vNthCall is a positive number, it returns True after it has been called vNthCall times, or it returns False.

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