CitectVBA Programming Reference > Understanding CitectVBA Language Basics > CitectVBA Data Types

CitectVBA Data Types

CitectVBA uses ten predefined data types:

Variable

Char

Type Declaration

Size

Value Range

Byte

Dim bytVar As Byte

1 byte (8 bits)

0 to 255

Boolean

Dim binVar As Boolean

2 bytes

True or False

String

$

Dim strVar As String

10 bytes + 1 byte per character

0 to 65,535 characters

Integer

%

Dim intVar As Integer

2 bytes

-32,768 to 32,767

Long Integer

&

Dim lngVar As Long

4 bytes

-2,147,483,648 to 2,147,483,647

Single precision

!

Dim sglVar As Single

4 bytes

3.4E-38 to 3.4E+38

Double Precision

#

Dim dblVar As Double

8 bytes

1.79D-308 to 1.79D+308

Variant

Dim vntVar As Any

16 bytes

Same ranges as data types stored

Object

Dim objVar As Object

4 bytes

Any OLE Object reference

Date/Time

Dim dtmVar As Date

8 bytes

Jan 1, 100 to Dec 31, 9999

Note: CitectVBA does not support user-defined data types.

See Also

Numeric Data Types

Numbers

Variables

CitectVBA Function Reference