Code
FUNCTION Str_IsLong(BYVAL Str AS STRING) AS LONG
    'Purpose
    '   Used to determine if a string is a valid LONG.
    'Parameters
    '   Str (STRING) = The string we're testing.
    'Return (LONG)
    '   Returns 1 if Str is a valid LONG.
    '   Returns 0 if:
    '       - Str is not a valid LONG.
    '       - Str is zero-length.
    'Version History
    '   1.0 2010.03.12 Tested by Russ Tanner on PB/CC 5.03.

    FUNCTION = IIF&( _
        (LEN(Str) > 0) AND _                                        'Empty string not a valid LONG.
        (ISFALSE (VERIFY(Str, "-0123456789"))) AND _                'Only these characters valid.
        (ISFALSE (VERIFY(MID$(Str, 2), "0123456789"))) AND _        'Minus only valid in front.
        (VAL(Str) >= -2147483648) AND (VAL(Str) <= 2147483647) _    'Check range.
    , 1, 0)

END FUNCTION


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)