Signature (Visual Basic / VBA)
Public Function VariantToVariantString( _
ByVal vValue As Variant _
) As String
Code Example
VariantToVariantString(CInt(2)) = Chr$(2) + Chr$(2) + Chr$(0)
VariantToVariantString(CLng(2)) = Chr$(3) + Chr$(2) + Chr$(0) + Chr$(0) + Chr$(0)
Parameters
| Parameter | Description |
|---|---|
| vValue | The value which is to be coerced into a string and returned along with information about the type of the original value. |
Notes & Version History
| Details | This function will create a string that can be converted back into the original type of value without requiring the type information to be stored independently. It uses the appropriate Make function to encode the internal representation of a value along with information about the data type of the value. |