I am getting an object required error when I run the following code:
"Country" is part of a custom class.
The code runs if I remove "Country" , listing the index.
I can't figure out why would I get an object error. I copied this code from an online tutorial and it works perfectly in the video.
https://www.wiseowl.co.uk/vba-macros/videos/vba-class-structure/dictionaries/ 21:25
Code:
Sub Schedule15(theDictionary As Dictionary)
Dim singleKey As Variant
For Each singleKey In theDictionary.Keys()
Debug.Print theDictionary.Item(singleKey).Country
Next singleKey
"Country" is part of a custom class.
The code runs if I remove "Country" , listing the index.
I can't figure out why would I get an object error. I copied this code from an online tutorial and it works perfectly in the video.
https://www.wiseowl.co.uk/vba-macros/videos/vba-class-structure/dictionaries/ 21:25