I am having an issue with the below code. Whenever it gets to the last line, it throws the error "Argument Not Optional", and will not compile. I have no clue what argument it is talking about.
Option Base 1
Dim temp As New ProductionItem 'Production Item is a class that I made
Dim Arr() As Collection
ReDim Arr(5)
Dim coll As New Collection
coll.Add temp
Arr(1) = coll
Collectionis an object. If you want to setArr(1)to be the collectioncoll, you will need toSet Arr(1) = coll. (But are you really intendingArrto be an array of Collections ofProductionItem?)key, because without theSetkeyword, VBA was trying to invoke the default property of theCollectionobject, that is,col1.Item(key)where the parameterkeyis mandatory...