heidegger2050
Programmer
I am new to VBA .. I am trying to modify Items in a Collection.. but I am having a hard time .
This is an example of what I mean ..
Sub Main()
Dim Cell_Matrix As New Collection
Dim Cell_01 As New Collection
Dim Cell_01_Occupancy As Boolean
Cell_01_Occupancy = False
Cell_01.Add Item:=Cell_01_Occupancy, Key:=CStr(1)
Cell_Matrix.Add Item:=Cell_01, Key:=CStr(1)
MsgBox Cell_Matrix(1).Item(1)
'I cant make this work
'Cell_Matrix(1).Item(1) = True
'MsgBox Cell_Matrix(1).Item(1)
End Sub
Your help would be greatly appreciated !
This is an example of what I mean ..
Sub Main()
Dim Cell_Matrix As New Collection
Dim Cell_01 As New Collection
Dim Cell_01_Occupancy As Boolean
Cell_01_Occupancy = False
Cell_01.Add Item:=Cell_01_Occupancy, Key:=CStr(1)
Cell_Matrix.Add Item:=Cell_01, Key:=CStr(1)
MsgBox Cell_Matrix(1).Item(1)
'I cant make this work
'Cell_Matrix(1).Item(1) = True
'MsgBox Cell_Matrix(1).Item(1)
End Sub
Your help would be greatly appreciated !