byronwall / bUTL

Excel add-in with helpers for charting, formatting, and general pain points
http://byroni.us/bUTL
MIT License
16 stars 3 forks source link

Dictionaries - early or late binding #60

Closed RaymondWise closed 7 years ago

RaymondWise commented 7 years ago

In module Formatting_Helpers I noticed in sub ColorForUnique that the dictionaries are declared with early binding, which will fail on any machines that do not already have the runtime library added as a reference. By using late binding with creating an object, this type of error can be avoided.

Your call.

byronwall commented 7 years ago

I typically prefer early binding because then Intellisense works in the IDE. If this were a reference to something less common, I might be more concerned about it. The Dictionary is in the Microsoft Scripting Runtime library which is standard for Windows as far as I know. Of course the add-in probably does not work on Mac, but I have not tried that.

If there's a lack of consistency for late/early binding across the add-in, that should probably be resolved unless there's specific reasons to do something late.