March 2003
Intermediate to advanced
512 pages
14h 30m
English
CStr Function
CStr(expression)expressionUse: Required
Data Type: Any
Any expression that is to be converted to a string.
expression converted to a
String.
Returns a string representation of
expression.
Almost any data can be passed to CStr to be converted to a string.
Dim sMyString SMyString = CStr(100)
The string representation of Boolean values is either
True or False, as opposed to their underlying
values of 0 and -1.
An uninitialized variable passed to CStr returns an empty string.
An object reference cannot be passed to the CStr function. Attempting to do so generates a runtime error.
Read now
Unlock full access