### Variable declarators for Basic syntax

Variable declarators let you define a variable by giving the variable a name. You can also assign a value to a variable when you declare it by using the Assignment operator. The following are variable declarators in Basic syntax.

##### Usage

- Dim x
- Dim x ()
- Dim x As Boolean
- Dim x As Number
- Dim x As Currency
- Dim x As Date
- Dim x As Time
- Dim x As DateTime
- Dim x As String
- Dim x As Number Range
- Dim x As Currency Range
- Dim x As Date Range
- Dim x As Time Range
- Dim x As DateTime Range
- Dim x As String Range
- Dim x () As Boolean
- Dim x () As Number
- Dim x () As Currency
- Dim x () As Date
- Dim x () As Time
- Dim x () As DateTime
- Dim x () As String
- Dim x () As Number Range
- Dim x () As Currency Range
- Dim x () As Date Range
- Dim x () As Time Range
- Dim x () As DateTime Range
- Dim x () As String Range.

  Declares a variable x that can hold data of a type corresponding to the variable declarator used.

##### Comments

- A variable declarator must be used to declare a variable before the variable can be used in a formula.
- Dim specifies a variable with local scope. You can use the keywords Local, Global, and Shared instead of Dim to specify different scopes. Local and Dim are equivalent keywords. See Variable Scope and Variable scopes for Basic syntax.

###### Related topics

Variable declarations using Dim (Basic syntax)

Declaring array variables (Basic syntax)

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com