Public Function VariantStringToVariant( _
ByVal vValue As Variant _
) As Variant Assuming
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)) = vbLongSee also: VariantToVariantString Function
CoerceToVarType FunctionvValue: 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.