I had to cobble together some code in Excel/VBA and vaguely remember we used to add a reference to Microsoft Scripting Runtime to use Dictionary. Now in the days of Office 2010, is that still the preferred way of getting access to a Dictionary like structure or have things moved on?
Asked
Active
Viewed 1.4k times
2 Answers
4
Dictionaries are still used the same old way in Excel VBA -- Read more here Does VBA have Dictionary Structure?
But there is an alternative to dictionary objects, using Collections
More about that here: Using Dictionary Object in Excel VBA
1
Be aware! Microsoft Scripting Runtime does not work on Mac. There is a workaround though. Get this https://github.com/VBA-tools/VBA-Dictionary and import Dictionary.cls into your VBA project. This will create a Dictionary class that will be used instead of the one in Microsoft Scripting Runtime

Tomas Hesse
- 385
- 3
- 10