MS Excel: CSng Function (VBA only)
In Excel, the CSng function converts a value to a single-precision number.
The syntax for the CSng function is:
CSng( expression )
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
VBA Code
The CSng function can only be used in VBA code. For example:
Dim LValue As Single
LValue = CSng(8.534535408)
In this example, the LValue variable would now contain the value 8.534535408.