CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2001
    Posts
    160

    Compile error cannot find project or library

    I have developed an application several years which is still be used today without any problems.
    The problem I am having with the code started when I took all of my projects from my old laptop and transfered them to my new laptop. All of my projects that I have tried to run seem to work great except this one. When I hit the run key i will get a "Complie error cannot find project or library" error, when I click ok it will highlight the "Right$" function in my code. Sometimes it will highlight the word "Error" in my error handlers.
    Here is what my references are in this order;

    VB for Applications
    VB runtime objects and procedures
    VB objects and procedures
    OLE Automation

    Does anyone have any suggestions?? Any help would be appreciated!

    thanks,

    Jason

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Compile error cannot find project or library

    What OS do you have now. Not the same? Thought so...

    Did you install SP6 for VB6?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Sep 2001
    Posts
    160

    Re: Compile error cannot find project or library

    Running Vista 64 now. I do have SP6 installed.
    I created a new project with this code;

    Private Sub Form_Load()
    Dim str_string As String

    str_string = "This is a test"
    Text1.Text = Right$(str_string, 4)


    End Sub

    It compiled fine. but it was also created in this machine. My other projects that I transfered work fine as well.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Compile error cannot find project or library

    Make a reference to the VB6 Runtime Library from your other program.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Compile error cannot find project or library

    I ran into something similar today with the Mid() function. I did not dive into it but the project had some references to Quick Books and QB was not on the machine. Odd that the compiler would complain about the Mid() function. At first I thought something was broken but I loaded another project and no issues. I then loaded the questionable project on a machine with Qb and no problems.

    It is not a problem but I did find it rather odd.
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Sep 2001
    Posts
    160

    Re: Compile error cannot find project or library

    Thanks for all your help. I found issue. In the References, there was a missing reference that went to the crystal data object. Once I unchecked it, everything worked great.

    Jason

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured