How to: Hold Integers in a Variable
Integers are whole numbers, including positive, zero, and negative. A variable holds integers if you declare it to be of type Integer. The Integer Data Type (Visual Basic) can hold integers from -2,147,483,648 through 2,147,483,647.
You can also use the Long Data Type (Visual Basic), the Short Data Type (Visual Basic), or the SByte Data Type (Visual Basic) to hold integers. For more information, see Numeric Data Types.
To hold integers in a variable
Declare the variable with a Dim Statement (Visual Basic).
Follow the variable name with an As clause.
Follow the As keyword with the Integer keyword.
Dim students As Integer
See Also
Concepts
Reference
Data Type Summary (Visual Basic)