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

Fix Up Variant To Boolean Mand Fn Function
Fix Ups Class

Public Function FixUpVariantToBooleanMandFn( _
    ByRef rArgument As Variant _
    ) As Boolean

"Fix Up Variant To Boolean Mandatory Function"
Convert numeric, date/time, numeric string, and date/time string Variant values to the Boolean data type.
Return True if the conversion was completed successfully.
Return False otherwise.

See also:
    FixUpVariantToBooleanMaybeFn Function
    FixUpVariantToBooleanMandSub Subroutine
rArgument: The argument which is changed to a Boolean value, if possible. Function returns False if conversion was not possible, such as when the argument is out-of-range, missing, Null, an error, a pointer, or a non-numeric string.
Note: rArgument is a passed by reference, so the variable passed from the calling function will likely be modified.

Example #1:

       Dim varFlag As Variant
       varFlag = "0"
    for example
       FixUpVariantToBooleanMandFn(varFlag) = True
       varFlag = False
       VarType(varFlag) = vbBoolean
Example #2:
       Dim varFlag2 As Variant
       varFlag2 = "Word"
    for example
       FixUpVariantToBooleanMandFn(varFlag2) = False
       varFlag2 = "Word"

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