I am trying to load a combo box with the last item in a dictionary. I am trying to do something like this ComboBox1.Value = NodeColl.Item(NodeColl.Count) which would work with a collection, but does something strange when using a dictionary instead. 
The behaviour is different because a Dictionary allows numeric keys.
Calling .Item actually adds an item with the given key so;
NodeColl.Item(NodeColl.Count)
Adds a new item with no value & a key corresponding to the count.
To access the ordinal item use .Items (which is an array of the items)
firstItem = NodeColl.Items(0)
lastItem  = NodeColl.Items(NodeColl.Count - 1)
                        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