Siebel VB Language Reference > VB Language Reference >

Static Statement


This standard VB statement declares variables and allocates storage space.

Syntax

Static variableName [As type] [,variableName [As type]] ...

Argument
Description

variableName

The name of the variable to declare as static

type

The data type of the variable; if not specified, the type is variant

Returns

Not applicable

Usage

Variables declared with the Static statement retain their value as long as the program is running. The syntax of Static is exactly the same as the syntax of the Dim statement.

Variables of a procedure can be made static by using the Static keyword in a definition of that procedure. For more information, read Function...End Function Statement and Sub...End Sub Statement.

See Also

Dim Statement
Function...End Function Statement
Global Statement
Option Base Statement
ReDim Statement
Sub...End Sub Statement

Siebel VB Language Reference