Numbers in Variants
- Last UpdatedJul 18, 2023
- 1 minute read
When storing numbers in variant variables, the data type used is the most compact type possible. For example, if you first assign a whole number to the variant it will be stored as an integer or long. If you assign a number with a fractional component, it is stored as a single or double.
For doing numeric operations on a variant variable, it is sometimes necessary to determine if the value stored is a valid numeric, thus avoiding an error. This can be done with the IsNumeric( ) function.