VBA-tools / VBA-Dictionary

Drop-in replacement for Scripting.Dictionary on Mac
MIT License
348 stars 89 forks source link

Could you please specify how to use it? #28

Closed naoliden closed 3 years ago

naoliden commented 4 years ago

Hi there, I'm very new to VBa and think this dictionary implementation is VERY useful. My problem is that I don't know how to import the dictionary class and make it work, I keep getting:

Compile error: User-defined type not defined

Could you please show me how to use the dictionary starting from how to import the class file properly on mac?

AdrianFischerBCN commented 3 years ago

Hi. You have to save the Dictionary.cls first somewhere, for example in the desktop.

Then go to the VBA editor. In the project windows, on the left side where you usually have the Modules and all your code, do right click and select Import>Class Module. Then import dictionary.cls.

Now you should notice that if you declare a variable such as this: Dim dictTest as Dictionary

The "Dictionary" type appears.