What is the syntax to declare an array?

Dim <array name>() ‘array without size
Dim <array name>(<integer>) ‘array with size
Dim <array name>(<integer>) As <data type> ‘declares array with size and data type
‘examples
Dim myArray(3,4) As Integer ‘a 2D array
myArray(2,1)=0

Dim myArrayTwo()
myArrayTwo=Array(1,2,3,4,5)

 

Advertisements