• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5699
  • Last Modified:

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.
VBA-Reference-Screen-Office-2013.png
0
4GvnNot4Gotn
Asked:
4GvnNot4Gotn
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
to avoid this error, use late binding instead of early binding in your  VBA codes
see this links for references


http://support.microsoft.com/kb/245115

http://www.granite.ab.ca/access/latebinding.htm
0
 
4GvnNot4GotnAuthor Commented:
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)?
0
 
4GvnNot4GotnAuthor Commented:
Great catch!  Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now