Statements (Basic Syntax)
A Basic syntax formula consists of a sequence of statements. Each statement must be separated from the previous statement by either a new line or a colon. Typically, each statement takes one line, but you can continue a statement onto the next line by using the line continuation character, which is a space followed by an underscore.
'Declare a variable x to hold a number.
Dim x As Number
'Assign the value of 30 to x.
x = 10 + 10 + 10
'This also assigns the value of 30 to x.
x = 10 + _
10 + 10
'Line continuation characters _
can also be used in comments.
Dim y as String
'Three statements separated by two colons.
y = "Hello" : x = 30 : formula = True