On Excel-VBA I have an array of collections (trying to function as a hashlist) that I want to pass into a function.
This is what I originally had.
Dim hashArray(200) As New Collection
populateHashArray(hashArray)
Function populateHashArray(data As Variant)
data(2).Add "value"
End Function
Whenever the code fires off the data(2).Add "value"
line I get the following error: Object variable or With block variable not set.
First attempted Fix: I tried to change the function parameters from "As Variant" to "As Collection"
Function populateHashArray(data As Collection)
data(2).Add "value"
End Function
This gave me a ByRef mismatch
Would any of you guys know how to solve this?