May 1995
Beginner
508 pages
16h 14m
English
CSng Function
CSng(expression)expression
Use: Required
Data Subtype: Numeric or String
The range of expression is -3.402823E38 to
-1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for
positive values.
expression cast as a Variant with a
subtype of Single.
Returns a single-precision number.
expression must evaluate to a numeric
value; otherwise, a type mismatch error is generated.
If the value of expression is outside the
range of the double datatype, an overflow error is generated.
Dim sngMyNumber
If IsNumeric(sMyNumber) then
sngMyNumber = CSng(sMyNumber)
End IfTest that expression evaluates to a number
by using the IsNumeric function.
Read now
Unlock full access