Dim VariableName [As Type] [= InitialValue]
Dim ArrayVariableName [As Type]() [= InitialValue]
Dim ArrayVariableName [As Type]({Dimensions}) [= InitialValue]
Defines a variable to be used in code.
The initial value must be a literal expression (like '3.14159', '"MyValue"' or '#23:59#'). Within subs/functions, the initial value can also be an expression.
Dim mVariable ' No type, so implicitly as Variant. No default, thus will be initialized with 'Empty'
Dim mName As String
Dim mInitialMonth As Long = 6
Dim mMyArray(5) '5, meaning index 0-5, thus 6 elements.
Dim mDayNames As String(6) = {"Mon", "Tue", "Wed", "Thu", "Fri","Sat","Sun"} '6 meaning index 0-6, thus 7 elements...
Dim mPrimaryColors As Long = {&hff, &hff00, &hff0000}
Dim mNumbers = {1, 2, 3}
Public Function MyFunction(pValue1 As Double, pValue2 As Double, pValue3 As Double)
Dim lAverage As Double = (pValue1 + pValue2 + pValue3) / 3
...
End Function