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

Variant String To Variant Function
Convert Values Class

Public Function VariantStringToVariant( _
    ByVal vValue As Variant _
    ) As Variant

"Variant String To Variant Value" or "Variant Value From Variant String"
Converts from a "Variant String" back to the original value.
For the purposes of this function, a "Variant String" is one which represents some type of value and also contains information about the type of value being represented.
Inverse of the VariantToVariantString function.

Summary: This function will convert a string created by the VariantToVariantString function back to its original value and data type.
       Dim strIntTwo As String
       strIntTwo = Chr$(2) + Chr$(2) + Chr$(0)
       Dim strLngTwo As String
       strLngTwo = Chr$(3) + Chr$(2) + Chr$(0) + Chr$(0) + Chr$(0)
    for example
       VariantStringToVariant(strIntTwo) = 2%
       VarType(VariantStringToVariant(strIntTwo)) = vbInteger
       VariantStringToVariant(strLngTwo) = 2&
       VarType(VariantStringToVariant(strLngTwo)) = vbLong
See also:
    VariantToVariantString Function
    CoerceToVarType Function
vValue: The string containing the internal representation of some value along with the type of the value. Function returns an empty string vValue is an empty string.

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