CStr Function

Converts any numeric expression to a string expression.

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


CSng (Expression)

āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļą āļ…āļœāļē:

String

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Expression: āļ”āļļāļ§ āˇ„āˇāļģāˇ€āˇ“āļ¸āļ§ āļ…āˇ€āˇāˇŠâ€āļēāļē āļ•āļąāˇ‘āļ¸ āļ­āļąāˇŠāļ­āˇ”āļ¸āļē āˇ„āˇ āˇƒāļ‚āļ›āˇŠâ€āļēāˇāļ­āˇŠāļ¸āļš āļ´āˇŠâ€āļģāļšāˇāˇāļąāļēāļšāˇŠ.

Expression Types and Conversion Returns

Boolean :

String that evaluates to either True or False.

Date :

String that contains the date and time.

Null :

Run-time error.

Empty :

String without any characters.

Any :

Corresponding number as string.


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

Error codes:

5 Invalid procedure call

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


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

Please support us!