Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    visual basic error message (2003)

    I'm getting and error message that occurs when some users try to run some macros that have not been modified in some time. I'm having trouble figuring out why this is. Basically the message I'm getting is "Compile Error: Can't find project or Library" I have no problems running these macros and don't seem to get the error message but others are having the issue. Below is a small sample of some basic visual basic where I'm getting the error.

    Dim Test as String
    Dim NS As String
    Test = "Woody's Lounge"
    NS = Left(Test,7)

    I would expect this to tell me NS is equal to Woody's but the macro keeps causing and error at the function Left, giving others the message that it can't find the project or library. Others are also having the problem with other macros where there are variables where I have not define the data type such as declaring it a string, long, integer, date etc..

    Any suggestions on what I can try to help resolve these errors would be appreciated. Thanks!!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: visual basic error message (2003)

    This is usually caused by a problem with references.

    You'll have to check this on a PC / under a user account where the error message appears.
    - Open the offending workbook.
    - Select Tools | Macro | Visual Basic Editor... (or press Alt+F11).
    - Select Tools | References...

    Is there a reference among the checked ones at the top that begins with MISSING? If so, that is the culprit.
    You can try clearing the check box for all references that begin with MISSING. Then select Debug | Compile <projectname> to see whether the code is now valid.
    If you get a message about an undefined type, you'll have to select Tools | References... again and tick the check box for the relevant library.

  3. #3
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: visual basic error message (2003)

    Hans - Thanks for the advice. I'll give this a try and see if I can get it to work. Thanks again!!

Posting Permissions

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