Specifies static storage for variables, objects and arrays; they are allocated at program startup and deallocated upon exit. Objects are constructed once when they are defined, and destructed upon program exit.

When declaring static arrays, only numeric literals, constants or enumerations may be used as subscript range values. Static variable-length arrays must be declared empty (no subscript range list) and resized using Redim before used.

In both iterative and recursive blocks, like looping control flow statements or procedures, static variables, objects and arrays local to the block are guaranteed to occupy the same storage across all instantiations of the block. For example, procedures that call themselves - either directly or indirectly - share the same instances of their local static variables.

A static variable may only be initialised with a constant value: its starting value is set at the start of the program before any code is run, and so it cannot depend on any variables or functions in it.

When used at procedure definition level (forbidden at declaration line level), Static specifies static storage for all local variables, objects and arrays, except temporary types and internal variables (objects not explicitly declared).

At module-level variable declaration only, the modifier Shared may be used with the keyword Static to make module-level static variables visible inside procedures.