0
votes

Some of my colleagues have Excel 2013 (it has Microsoft Outlook 15.0 Object Library).
I have Excel 2016, it has Microsoft Outlook 16.0 Object Library.

Using some Outlook in VBA to send out a message at end. When they want to open the Excel file, they get 'compile error', due to having the version 16.0 MISSING in VBA/Tools/References. If they untick it, and tick the 15.0, it works for them.

I can not select version 15.0 in Excel 2016, its not an option.

How can this be solved? Not sure whether there is code to automatically tick the correct version, depending on your excel version.

1

1 Answers

0
votes

Just use late binding, as Tim WIlliams said.