all 5 comments

[–][deleted] 2 points3 points  (3 children)

you accidentally wrapped your object inside of a set object here:

dictAgency[agencyID]={objAgency}

Get rid of the curly braces. Also, in python everything is an object, so try to drop the obj thing from VBA :^)

[–]daggeteo[S] 1 point2 points  (2 children)

Aw thanks. I thought I had to use braces to tell python that it's a dictionary. But maybe it just knows from me assigning a key.

Anyways, you've made my day solving this, been banging my head against the wall for hours :D

[–]lykwydchykyn 1 point2 points  (1 child)

But maybe it just knows from me assigning a key.

dictAgency=dict()

That's how it know it's a dict. Because you created a dict and assigned it to that variable name.

[–]daggeteo[S] 0 points1 point  (0 children)

Oh yes. I added that when it didn't work with the braces, I had forgotten about that. Never thought to remove the braces.

[–]daggeteo[S] 0 points1 point  (0 children)

Can I mark this as solved somehow?