Home Privacy Policy Feedback Link to us Site Map

MS Excel: CStr Function (VBA only)


In Excel, the CStr function converts a value to a string.

The syntax for the CStr function is:

CStr( expression )


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

VBA Code

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".