Public Function BinaryStringToVariant( _
ByVal vValue As Variant _
, ByVal vVarType As Variant _
, Optional ByVal vFmLSBFirst As Variant _
) As Variant
"Binary String To Variant" or "Variant From Binary String" Examples:
Converts a binary string such as "0000001100001100" back into the type of value specified by vVarType.
Order of incoming BITS determined by vFromLSBFirst argument.
The inverse of this function is BinaryStringFmVariant.
BinaryStringToVariant("0000001100001100", vbString, False) = Chr$(3) + Chr$(12)
BinaryStringToVariant("0000001100001100", vbInteger, False) = 780
BinaryStringToVariant("0000001100001100", vbString, True) = Chr$(48) + Chr$(192)
BinaryStringToVariant("0000001100001100", vbInteger, True) = 12480See also:
BinaryStringToString FunctionvValue: The string in which each character represents one of the bits within the result value. Function returns Null if vValue is Null or cannot be fixed up to a String.
vVarType: The type of value whose bits are represented by the characters in string vValue and the type of value that should be returned by this function after the bits are assembled. Function returns Null if vVarType is Null or cannot be fixed up to a number.
vFmLSBFirst: True if the bits in string vValue are organized with the least-significant-bit first, and False if they are organized with the most-significant-bit first. vFmLSBFirst defaults to False if it is missing or Null or cannot be fixed up to a number.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.