What I am trying to do is fairly straightforward. I want to get a list of all items (values) in a Dictionary
, and save them in an array of strings.
I'd guess this code would work:
Sub PrintFilters(ByVal crit As Dictionary)
Dim i() As String
i = crit.Items()
' Do stuff with i
End Sub
However, I am getting a type mismatch on the third line. I am guessing that crit.Items()
's return value is some kind of list, an not an array. The MSDN pages do not mention what this method's return value's type is, though.
Is there a proper way to do this?
I think is Variant type so try this:
Sub PrintFilters(ByVal crit As Dictionary)
Dim i As Variant
i = crit.Items()
' Do stuff with i
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With