Static Definition

Syntax              Static vardeclaration[, ...]

Group                Declaration

Description       A static variable retains it value between procedure calls. Dimension var array(s) using the dimensions to establish the minimum and maximum index value for each dimension. If the dimensions are omitted then a scalar (single value) variable is defined. A dynamic array is declared using ( ) without any dimensions. It must be ReDimensioned before it can be used. 

See Also            Dim, Option Base, Private, Public, ReDim.

Example            '#Language "WWB-COM"
Sub A
    Static X
    Debug.Print X
    X = "Hello"
EndSub

Sub Main
    A
    A ' prints "Hello"
EndSub