Sub Globals
'Declare the global variables here.
Dim Type(x,y) ElementList(0)
Dim Type(x,y) TempList(0)
End Sub
Sub App_Start
'usage example
Redim(10)
For i = 0 To 9
ElementList(i).x = i
ElementList(i).y = i * 2
Next
Redim(100)
Msgbox(ElementList(5).x,ElementList(4).y)
End Sub
Sub Redim(size)
Dim TempList(size,2)
For i = 0 To ArrayLen(ElementList())-1
TempList(i).x = ElementList(i).x
TempList(i).y = ElementList(i).y
Next
ElementList() = TempList() 'Both arrays will point to the same array.
End Sub