kuFGe‖

DQkiY‖CStr Function

3CEMW‖Converts any numeric expression to a string expression.

uttcP‖Syntax:


UnBtF‖CStr (Expression)

aiywX‖Return value:

String

cHP4B‖Parameters:

JbzvP‖ Expression: Any valid string or numeric expression that you want to convert.

EzY72‖Expression Types and Conversion Returns

Boolean :

wjcDB‖String that evaluates to either True or False.

Date :

CrwVu‖String that contains the date and time.

Null :

ZATnW‖Run-time error.

Empty :

SfQUa‖String without any characters.

Any :

vzaXy‖Corresponding number as string.


GEAXv‖Zeros at the end of a floating-point number are not included in the returned string.

SEjHR‖Error codes:

5 Invalid procedure call

GLodW‖Example:


Sub ExampleCSTR
Dim sVar As String
    MsgBox CDbl(1234.5678)
    MsgBox CInt(1234.5678)
    MsgBox CLng(1234.5678)
    MsgBox CSng(1234.5678)
    sVar = CStr(1234.5678)
    MsgBox sVar
End Sub