MS Excel: CSTR Function (VBA)
In Microsoft Excel, the CSTR function converts a value to a string.
Syntax
The syntax for the CSTR function is:
CStr( expression )
expression is the value to convert to a string.
Applies To
- Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Function
- VBA function (VBA)
VBA Function Example
The CSTR function can only be used in VBA code. For example:
Dim LValue As String LValue = CStr(8)
The LValue variable would now contain the string value of "8".