参照[https://ja.wikipedia.org/wiki/Visual_Basic_for_Applications]
Function main() Dim i As Intger '整数型の定義 Dim moji As String '文字型の定義 Dim d As Double '小数型の定義 Dim day As Date '日付型の定義 Dim array() As String '配列の定義 Dim any As Variant '全ての型 main = i '返却値 }
Dim key As Integer key = 1 If Key = 2 Then '真 Else '疑 End if
For i = 1 To 10 Step 1 ' 10回ループ Next i
Dim array() As String ReDim Member(3) '配列要素数再定義 array(1) = "apple" array(2) = "banana" array(3) = "orange" For Each tmp In array '配列の要素分ループ Next
Dim i As Intger i = 1 Do while $i > 0 '無限ループ i = i + 1 if i > 3 Then GoTo label01 ' ①にジャンプ End if i = i + 1 :label01 ' ① Loop