+ Reply to Thread
Results 1 to 2 of 2

Compile error concerning project or library running macro

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Compile error concerning project or library running macro

    I am a novice at VB and know just enough to be dangerous. I have a pretty complex spreadsheet with many macros. One macro (called "Save a Copy"), creates a copy of the workbook, saves it into a seperate folder, and names it with the current date and the contents of a particular cell. It works perfect on my machine using Excel 2003 SP3. One of my users has Excel 2002. When she hits the "Save a Copy" macro button, she gets a compile error stating "Can't find project or library". If she hits Debug, it leads her to what appears to be an issue with the Format command within the code. This occurs when it tries to format the date before performing the save. I discovered somewhere that if I close the debug screen, go back to the VB screen and go to Tools>References, I see that "MISSING:Microsoft Outlook 14.0 Object Library" is checked. If I uncheck that box and go back to the spreadsheet, the "Save a Copy" macro will work and not present the compile error. But, it will only work during THAT Excel session only. If I close and restart Excel, the "Save a Copy" macro will error out again and I have to go back to VB and uncheck that box again. Can anyone explain what is happening and how I can cure this problem? Any assistance is greatly appreciated.

    Here is my code.
    Please Login or Register  to view this content.
    Last edited by rkjudy; 12-07-2010 at 09:25 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Compile error concerning project or library running macro

    Hi rkjudy

    Just guessing here because I can't test this. The Outlook Library for Office 2002 is "Microsoft Outlook 11.0 Object Library".

    What I would try is to open the ORIGINAL workbook on the 2002 users platform. Delete the reference to "Microsoft Outlook 14.0 Object Library" and set the reference to "Microsoft Outlook 11.0 Object Library". Save and close the ORIGINAL file. Reopen it and run the procedure again. Just my thoughts. Try it, it may work.

    The assumption is that the user actually needs the reference to Outlook.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1