Link to home
Start Free TrialLog in
Avatar of 4GvnNot4Gotn
4GvnNot4GotnFlag for United States of America

asked on

Access 2013 - RunTime Compile: Missing References Excel 14-15

I have an Access 2013 (32 bit) app that I've developed.  It contains an export feature to "inject" data into Excel worksheets.

The problem I have is that I've compiled it using  a reference to the Microsoft Office 15.0 Object Library and Microsoft Excel 15.0 Object library (Office 2013).  When my users install it on their PC and have Office 2010  (which uses the Microsoft Office 14.0 Object Library and Microsoft Excel 14.0 Object library) the application throws an error on start-up and I have to go in manually, open VBA / Tools / References (shows Missing: Microsoft Office / Excel 15.0 Object Library) and set the reference back to Microsoft Office 14.0 Object Library and Microsoft Excel 14.0 Object library.

Works fine if the user has Office 2013 installed but breaks if the user has Office 2010 installed.  

I need a way to trap this error and set the references dynamically based on the version of Office they are using.

HELP!  This is causing a lack of confidence on the part of the client and I don't blame them.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 4GvnNot4Gotn


Thanks for the note.  How do I check to see which version that they are using and bind to the references for that version at run-time (not just kick out an error)?
Great catch!  Thanks!