Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Declaring Variables
In VBA, variable declarations are not mandetory.
If a variable is used without being declared, or if no type is specified,
it will be assigned the type Variant.
Dim x
x=10
y=20
x = "Hello"
y = "Good morning"
Option Explicit
Use the Option Explicit statement on first line of a module to
force all variables to be declared before usage.
Dim statement
To explicitly declare variables in VBA, use the Dim statement,
followed by the variable name and type.