Professional Documents
Culture Documents
Else
End If
Conditional statement Select Case.
It is executed when expression var == val
End Function
Function which returns a value type of Typ
Function functionName (arg1 As Typ1, ) As Typ
Dim var As Typ
functionName = var
End Function
Operators
Case val2
Case Else
End Select
Loops For, Do While.
It is executed until counter equals end.
For counter = start To end [ Step step]
Next counter
[]- optional by default step = 1
Loop Do While.
It is executed until condition cond is true.
Do While cond
Loop
Do
And
- logical AND
Or
- logical OR
<>
- not equal to
=
- Basic assignment
=
- Equal to
Not
- Logical negation NOT
> , < , >= , <= - other comparison operators
+, -, * , / , ^ - mathematical operators
Typy zmiennych:
Integer - integer number
Double - A double-precision floating point value
String - chain of characters
Definition of a variable type of Typ
Dim var As Typ
Useful objects:
Cells (row, cols)
- reference to the cell with
coordinates (row_number, column_number)
MsgBox (message) - displays a window with the
message
InputBox (message) displays a window with the
message and a field in which a data can be input
Randomize
- it provides generation of
pseudorandom numbers
General file structure
Loop Do Until.
It is executed until condition cond is false.
Do Until cond
Loop
Do
Sub subName()
End Sub
Other:
comment