Code:
Private Type myArray
fName As String
Apple As single
Banana As Single
Orange As Single
End Type
Private Basket() As myArray
Private Sub cmdPage_Click(Index As Integer)
'I know I could declare a fixed array length but want to dynamically increase it!!
ReDim Preserve Basket(10, 0) 'So we have 10 baskets
FillBank 0, "test", 121, 10, 0
FillBank 0, "test2", 121, 3, 0
FillBank 1, "test", 121, 10, 0
FillBank 1, "test2", 121, 3, 0
FillBank 1, "test3", 121, 3, 0
FillBank 1, "test4", 121, 3, 0
FillBank 2, "test", 121, 10, 0
''And this goes onnnnnn
End Sub
'Another Sub which fills the ARRAY
Private Sub FillBank(ByVal BankNo As Single, ByVal sName As String, ByVal CCNo As Single, ByVal CC3No As Single, ByVal ProgNo As Single)
Basket(BankNo, UBound(Basket, 2)).fName = CCNo
Basket(BankNo, UBound(Basket, 2)).Apple = CCNo
Basket(BankNo, UBound(Basket, 2)).Banana = CC3No
Basket(BankNo, UBound(Basket, 2)).Orange = ProgNo
ReDim Preserve Basket(bankNo, UBound(Basket, 2) + 1) 'open a buffer 1 ahead
End Sub