0
votes

I've written a piece of kit on Excel 2016 that uses a combination of formula and vba macros.

Basically some of the people that will be using this may be using an older version of Excel (2013 or 2010). When testing out whether the file will run on 2013 the Microsoft Powerpoint 16.0 library was missing and some of the code would not run.

The only fix was to add the Microsoft PowerPoint 15.0 library and then it seemed to work.

Is there any way to add the libraries automatically when I send this file to other people, or add the 15.0, 14.0 and 13.0 library's in my copy so that this is not an issue for other users?

[EDIT] From further reading it appears that older versions of excel use different libraries and it doesn't look like you can "pick and choose" whether to use 16.0, 15.0 etc. (Please correct me if I'm wrong). Apparently there is something called "Early/Late Binding" which might help me out, I assume this is referencing within my actual VBA code so if that is a viable solution any more information would be appreciated.

1

1 Answers

1
votes

You have two options.

  1. Develop on the lowest common denominating Office version (references will automatically "upgrade" on newer versions)
  2. Change your code from early binding (using a reference to the library) to late binding (using generic Object declarations for everything related to PPT, replacing all PPT constants with their associated values). You then get a reference to Powerpoint using the CreatObject or GetObject function.