Signature (Visual Basic / VBA)
Public Function MakeVarType( _
ByVal vValue As Variant _
) As String
Code Example
MakeVarType(CCur(1)) = Chr$(16) + Chr$(39) + String$(6, 0)
MakeVarType(CDbl(1)) = String$(6, 0) + Chr$(240) + Chr$(63)
MakeVarType(CInt(1)) = Chr$(1) + Chr$(0)
MakeVarType(CLng(1)) = Chr$(1) + String$(3, 0)
MakeVarType(CSng(1)) = Chr$(0) + Chr$(0) + Chr$(128) + Chr$(63)
MakeVarType(Null) = ""
Parameters
| Parameter | Description |
|---|---|
| vValue | The value whose in-memory representation is to be returned in the form of a string. vValue can be a numeric value, a date value, a numeric string, or a date string. Function returns an empty string if vValue is Null or Empty. Function returns vValue unchanged if it is already a string. |
Notes & Version History
| Note | This function converts the string representation of the value to Unicode using the default code page of the system, except in the case where the string is a Byte or String value. |
| v1.3 Change | Removed 16-bit support from this function. |