Missing Reference Libraries

  • I made a project in Excel 2002 that works great in that version of Excel and in Excel 2003 but when I try it on a computer that has Excel 2000 I get a runtime error that an object library is missing. The references that I used were Microsoft Office 10.0 Object Library, Microsoft Word 10.0 Object Library, and Microsoft Forms 2.0 Object Library. When I didn't see them listed in the references list on the older computer I tried copying the files for these 3 references to the older computer. I then opened the VB editor and clicked Tools and References and clicked the browse button. I can locate the references that I copied to the older computer but when I click on it to try to add it nothing happens.

    I also tried to select the Microsoft Office 9.0 Object Library but the code won't run using it.

    I am very new with VBA and am in a bind because I need to make the program work in Excel 2000. Is there an easy fix to getting these 3 reference libraries onto the older computer?

  • Re: Missing Reference Libraries

    Office 2002 may have added a command that you are using in your code that did not exist in (and is not supported by) Excel 2000. So you may need to rewrite that portion of your code.

    When you say the code won't run using the 9.0 library, what is it doing? That is, are you getting an error at a particular point in the code? We can probably help with the code revision if you know where the error point is (points are) and show us the code from there.

    Oh, and I just noticed this was your first Oz post! Welcome to OzGrid!

  • Re: Missing Reference Libraries

    The code is listed below. I am new to VBA and had used the macro recorder to generate the code.

    The code will stop on the part that says "selection.replace what....."

    I am on a time crunch for the project and would have lots of code to rewrite. I will do it if time permits to make the program work in 2000 but is there anyway to take a newer object library and install it on an older computer?

    Thank you!

  • Re: Missing Reference Libraries

    It looks like you could replace these lines:

    Selection.Replace What:="#n/a", Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        Selection.Replace What:="0", Replacement:="", LookAt:=xlWhole, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _


    Dim c As Range
    For Each c In Selection
        If WorksheetFunction.IsNA(c) Or c = 0 Then c.ClearContents
    Next c

    Note: Please use code tags around your VBA code. Make sit much more readible.

    P.S. I don't know if you can add a newer-version library to an older version of Excel, but I doubt that it would work.

  • Re: Missing Reference Libraries


    I tried the code above and kept getting a runtime error '424' "Object Required" when I replaced the original code with the above code.

    I tried inserting it the long page of code and I tried making it a seperate procedure that I would call and either way I get the error that an object is required.

  • Re: Missing Reference Libraries

    Since your area (in your origina code) is already selected, that code should run. Did you replace just the two Replace lines?

    Post the code you came up with so we can look at it to comment.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!