CInt
Converts expressions to an integer data type.
Syntax
CInt(Exp)
Exp:
A valid string, number or Variant containing a value recognizable as a string or number.
Return Value
Returns the value of the expression Exp provided in the argument as an integer data type.
Related Functions
CDate | CDbl | CLng | CSng | CStr | CVar
Example
Dim x as integer
Dim y as long
x = CInt(y) 'Converts the long value of y to an integer value in x