VBA Code Protection > Supported VBA syntax by compiler > Variables
There is no need to declare variable in script but, if you want to, you declare variable just using DIM directive and its name.
S = "Hello world!"
A = 0
A = A+1
You can also declare global variables as private or public using the following syntax:
B = 0
A = B + 1
Variable declared with DIM statement are public by default. Private variables are not accessible from other scripts.
Variables can be default initialized with the following syntax
DIM A = "Hello world"
DIM B As Integer = 5
Copyright © 2021 G.D.G. Software