UShort Data Type

Holds unsigned 16-bit (2-byte) integer values in the range 0–65535.


UShort is short for "unsigned short integer".

Default value
When you declare a variable of type UShort and leave it uninitialized,, its value defaults to zero (0).
Because UShort is an unsigned type, when you use the unary minus (-) operator on an expression of this type, the value is first converted to a Integer then negated.
The UShort data type widens to Integer, UInteger, Int, Uint, Long, ULong, Huge, UHuge, Single, Double, Real, or Quad without any risk of overflow.
Type characters
Affixing the characters %U16 to the end of a variable name declares it as having a type of UShort.


Dim foo As UShort
Dim bar%U16

See also