Str Function

Converts a numeric expression into a string.

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


CSng (Expression)

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

String

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

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

The Str function converts a numeric variable, or the result of a calculation into a string. Negative numbers are preceded by a minus sign. Positive numbers are preceded by a space (instead of the plus sign).

Error codes:

5 Invalid procedure call

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


Sub ExampleStr
Dim iVar As Single
Dim sVar As String
    iVar = 123.123
    sVar = LTrim(Str(iVar))
    MsgBox sVar & chr(13) & Str(iVar)
End Sub

Please support us!