none
Missing VBA Object Librarys. How to get them RRS feed

  • Question

  • Hi

    I develop Access databases using MS Access 2013 or 2016 (both 32 bit).
    One of my customers getting errors and when we compile the VBA code on his machine there is errors pointing to missing "MS graph 16.0 Object Library" and "MS Excel 16.0 Object Library".

    When the customer search för those Object Libraries, in Visual Basic/ Tools / he cant find them.

    How can this be fixed?


    Best // Peter Forss Stockholm GMT +1.00

    Thursday, April 6, 2017 5:38 PM

Answers

  • That the issue you are developing in 2016 and they have 2013.  You can't do that.  You always need to develop using the oldest version that will need to run the database.  So in this case development needs to occur in 2013.  then it would work in 2013 and 2016 no problem.

    Also, switching to late binding would also avoid the versioning issue altogether.

    Do you need them?  You tell me.  If you aren't automating Excel, graphs than no.  If you are, then yes.  Try removing them one at a time and compile your code.  If you get compilation errors then you know you needed the reference you just removed.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, April 6, 2017 6:40 PM

All replies

  • Does the customer actually have Excel installed?  Excel 2016?

    Switch to use Late Binding rather than Early Binding would be your best best.  See: https://www.devhut.net/2016/11/08/vba-early-binding-and-late-binding/


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, April 6, 2017 5:59 PM
  • Hi Daniel

    Thanks for responding.

    Yes the customer have Excel installed as a part of MS Office 2013.

    When I myself uncheck "MS graph 16.0 Object Library" and "MS Excel 16.0 Object Library" and run the application on my machine with Access 2016 I dont get errors. (Have not test Everything yet)

    So... Do I really need them?


    Best // Peter Forss Stockholm GMT +1.00

    Thursday, April 6, 2017 6:31 PM
  • That the issue you are developing in 2016 and they have 2013.  You can't do that.  You always need to develop using the oldest version that will need to run the database.  So in this case development needs to occur in 2013.  then it would work in 2013 and 2016 no problem.

    Also, switching to late binding would also avoid the versioning issue altogether.

    Do you need them?  You tell me.  If you aren't automating Excel, graphs than no.  If you are, then yes.  Try removing them one at a time and compile your code.  If you get compilation errors then you know you needed the reference you just removed.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, April 6, 2017 6:40 PM
  • Thanks Daniel

    1. No compile errors :-)

    2. If the user install Access 2016 Runtime. Will this solve the problem?


    Best // Peter Forss Stockholm GMT +1.00


    Thursday, April 6, 2017 7:33 PM
  • No, because that won't give them the Excel 2016 library ... Only the Access 2016 library.  They have to install office 2016.

    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, April 6, 2017 7:43 PM
  • You might also want to look into integrating a Reference Checking procedure into your database, something like: https://www.devhut.net/2017/03/03/vba-list-references/

    It should be the first thing that gets run!  (relinking, persistent connections, ... all of that comes after and only if no broken links were identified).


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Friday, April 7, 2017 8:48 AM