Dim a as integer' defines an integer variable-32,768 to 32,767.
Examples of global variables
The public variable 1 is an integer.
LLL is
The variable1=111.
End joint
Examples of module-level variables
DIM variable 1 is an integer.
LLL is
The variable1=111.
End joint
How to define variables of decimal type in vba
How to use decimal font in VBA? Variables are declared as variable types.
Subtest ()
Dim varNumber as a variant.
varNumber = 3. 14 15
If VarType(varNumber) = vbDouble, then
MsgBox "is double-precision by default"
If ... it will be over.
var number = CDec(3. 14 15)
If VarType(varNumber) = vbDecimal, then
MsgBox "Decimal "only appears after CDec function conversion.
If ... it will be over.
End joint