+ Reply to Thread
Results 1 to 7 of 7

macro compile error in 2007 (not in 2010)

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    macro compile error in 2007 (not in 2010)

    Hi

    I have a macro developed in excel 2010. The macro contains left,right,dir functions.

    When I run in 2010 its fine, but the same macro when run in excel 2007. I am getting compile error

    Complie error: Cant find project or library.

    Please let me know what reference I need to add.

  2. #2
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: macro compile error in 2007 (not in 2010)

    Hi

    in the VBE go Tools>References and check for anything listed as MISSING. Uncheck those and try re-running.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: macro compile error in 2007 (not in 2010)

    If you look in the list of references in 2007 (Tools - References), the missing one should have the word MISSING in front of it.
    Martin

  4. #4
    Registered User
    Join Date
    02-14-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: macro compile error in 2007 (not in 2010)

    Should I check or uncheck

  5. #5
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: macro compile error in 2007 (not in 2010)

    Quote Originally Posted by Firefly2012 View Post
    Hi

    in the VBE go Tools>References and check for anything listed as MISSING. Uncheck those and try re-running.
    Uncheck them

  6. #6
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: macro compile error in 2007 (not in 2010)

    Well, it's not certain that it will solve the problem, assuming that the macro needs the references to the specified library, i.e. it will just replace one error with another...
    If you are pleased with a member's answer then use the Star icon to rate it.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro compile error in 2007 (not in 2010)

    If a reference is marked missing uncheck as recommended. This usually resolves the problem.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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