VBA Numbers


General information about "Decimal" Decimal is a subtype of Variant In VBA, the number type Decimal is special. Decimal is not an independent number type. It is a subtype of the type Variant. The type Variant can contain all kind of data: numbers, texts, objects, Null, Empty and so on. […]

VBA Number Types: Decimal


General information about "Double" From -1.79769313486231e308 to 1.79769313486231e308 In VBA, a number of the type Double is a number that can be written in the format defined by the binary64 IEEE Standard for Floating-Point Arithmetic. A number of the type Double can be formatted like ±1.x × 2y-1023 where "1.x" […]

VBA Number Types: Double


General information about "Single" From -3.402823e38 to 3.402823e38 In VBA, a number of the type Single is a number that can be written in the format defined by the binary32 IEEE Standard for Floating-Point Arithmetic. A number of the type Single can be formatted like ±1.x × 2y-127 where "1.x" […]

VBA Number Types: Single



General information about "Currency" From -922337203685477.5808 to 922337203685477.5807 In VBA, a number of the type Currency is a number that can contain values in {-922337203685477.5808,...,-0.0001,0,0.0001,..., 922337203685477.5807}. [crayon-5fbcfe98c21ed217907956/] The following VBA code works. [crayon-5fbcfe98c2203346884296/] When you assign a value outside of the range {-922337203685477.5808,...,-0.0001,0,0.0001,..., 922337203685477.5807}, the VBA code will crash. At […]

VBA Number Types: Currency


General information about "Long" From -1.79769313486231e308 to 1.79769313486231e308 In VBA, a number of the type Double is a number that can be written in the format defined by the binary64 IEEE Standard for Floating-Point Arithmetic. A number of the type Double can be formatted like ±1.x × 2y-1023 where "1.x" […]

VBA Number Types: Long


General information about "Byte" From 0 to 255 In VBA, a number of the type Byte is a number that can contain values in {0,1,..., 255}. [crayon-5fbcfe98c3de1258198640/] The following VBA code works. [crayon-5fbcfe98c3df4098341196/] When you assign a value outside of the range {0,1,..., 255}, the VBA code will crash. At […]

VBA Number Types: Byte



General information about the use of numbers in VBA Types of numbers in VBA In VBA, every number has a type. VBA offers a range of number types to choose from. Number type Byte Integer Long Single Double Currency Decimal When you need a number, you need to choose the […]

VBA Number Types: Introduction


General information about "Integer" From -32768 to 32767 In VBA, a number of the type Integer is a number that can contain values in {-32768,...,-1,0,1,..., 32767}. [crayon-5fbcfe98c6bf9394716001/] The following VBA code works. [crayon-5fbcfe98c6c0f011681693/] When you assign a value outside of the range {-32768,...,-1,0,1,..., 32767}. the VBA code will crash. At […]

VBA Number Types: Integer