Missing Reference Libraries for VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GKJR
    New Member
    • Jan 2014
    • 108

    Missing Reference Libraries for VBA

    My database seems to be acting up on me today. It is throwing up errors and highlighting very basic built in functions like Format() and Left(). It's happening when I run my code that I've used for years to filter a continuous form, as well as when I try to use my custom ribbon buttons. I feel like there is a library missing. I've been running Access 2016 on Windows 10 for several months now, and I haven't had this issue before. These are the references I have right now, in this order:

    Visual Basic for Applications
    Microsoft Access 15.0 Object Library
    OLE Automation
    Microsoft Office 16.0 Access database engine Object Library
    Microsoft Office 16.0 Object Library
    Microsoft Office.NET Private Object Library
    MISSING: Office Communicator W14 Type Library

    When I run my code this is what I'm getting -
    Compile Error:
    Can't find project or library

    I really don't know much about what is happening behind the scenes with reference libraries, but that is my best guess as to the problem. That last one that says MISSING: is certainly suspicious.
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    Uncheck the missing reference and then close out of that window. Then go back into your references list and then find your reference again and checkmark it. That should fix the missing reference.

    To fix your other problem, you could try unchecking all of them and then going back in and selecting them again.

    Comment

    • GKJR
      New Member
      • Jan 2014
      • 108

      #3
      That's strange, all I had to do was uncheck that box. I tried doing that before I posted that question and it just came back automatically. When I unchecked it the first time it was in the middle of the list, then when it came back on its own it was at the end. This time it hasn't come back yet so I'll keep my fingers crossed. Thanks Seth.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        another thing... when I am doing a lot of editing and design this will happen to me... I close everything and do a warm-reboot and 90% of the time this fixes the issue.

        Comment

        • mbizup
          New Member
          • Jun 2015
          • 80

          #5
          Also worth checking into Late Binding vs Early Binding coding styles:


          There are pros and cons to each. The big advantage of Late Binding is that it makes your code version independent, and independent of checked references. This is a plus, particularly in environments that may have different versions of the libraries in question.

          The downside is that there is a performance hit. You also lose the handy intellisense/autocompletion in the VBA editor (which can be worked around by declaring your variable for both early and late binding, and comment/uncomment the appropriate declarations depending on whether you are currently programming or releasing your database for production)
          Last edited by zmbd; Dec 2 '15, 06:24 PM. Reason: [z{thank you for that link - added that to my bookmarks!}]

          Comment

          Working...