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

C Lng Ign Err Function
Convert Values Class

Public Function CLngIgnErr( _
    ByVal vValue As Variant _
    ) As Long

"Convert To Long Ignore Errors"
Attempt to convert vValue to a Long (Integer) value.
Return vValue as a Long value if the conversion was successful.
Return 0 (zero) if vValue could not be converted to a Long.

Examples:
    CLngIgnErr(34) = 34&
    CLngIgnErr(0) = 0&
    CLngIgnErr(-34) = -34&
    CLngIgnErr(34.3) = 34&
    CLngIgnErr(123456) = 123456&
    CLngIgnErr(1E40) = 0&
    CLngIgnErr("1") = 1&
    CLngIgnErr("0") = 0&
    CLngIgnErr(#12/31/1899#) = 1&
    CLngIgnErr("Word") = 0&
See also:
    CanBeLong Function
    CIntIgnErr Function
    CLng Function (Visual Basic)
vValue: The value which will be converted to a Long and returned (if conversion is possible). Conversion is not possible if vValue is Null, an Error, an Object, a non-numeric String, or a numeric value out of the range allowed for this data type.

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