Paul
Paul

Reputation: 197

Returning an dictionary object from a function in VBA

I have the following declaration in a function in VBA:

Set dict = CreateObject("Scripting.Dictionary")

When I try to return dict using the code GetDates = dict I get an error. Can someone help please?

Thanks!

Upvotes: 0

Views: 3689

Answers (1)

Jacob
Jacob

Reputation: 43239

Set GetDates = dict

You have to use Set.

Upvotes: 3

Related Questions