+ Reply to Thread
Results 1 to 7 of 7

Thread: "Can't find project or library"

  1. #1
    Forum Contributor
    Join Date
    11-17-2009
    Location
    PA USA
    MS-Off Ver
    Excel 2000
    Posts
    174

    "Can't find project or library"

    I am getting a complie error that I did not get when the code was written. Earlier versions of the same workbook still work fine without error. I hope thie workbook is not corrupted.

    The error happens with the None command in this code for a button in a user form.

    Private Sub cmdConfirm_Click()
    Unload Me
    Range("$A$45:$G$152").Value = ""
    Range("$E$39").Value = "0"
    Range("$A$41:$G$152").Font.Bold = False
    Range("$D$41:$G$152").Interior.Color = RGB(255, 255, 204)
    Range("$D$41:$G$152").Borders.LineStyle = None
    End Sub
    Attached Images Attached Images
    Last edited by proepert; 02-14-2010 at 03:40 AM.

  2. #2
    Forum Guru
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2003, 2007.
    Posts
    1,462

    Re: Help with error "Can't find project or library"

    proepert,

    Try:

    
    Range("$D$41:$G$152").Borders.LineStyle = xlNone
    Have a great day,
    Stan
    stanleydgromjr
    Windows Vista Business, Excel 2003 and 2007

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-17-2009
    Location
    PA USA
    MS-Off Ver
    Excel 2000
    Posts
    174

    Re: Help with error "Can't find project or library"

    Wow that was fast, and it works, but can you tell me why it worked for weeks without the xl? Did I delete something I shouldn't have?

  4. #4
    Forum Contributor
    Join Date
    11-17-2009
    Location
    PA USA
    MS-Off Ver
    Excel 2000
    Posts
    174

    Re: Help with error "Can't find project or library"

    I'm also getting the same error message with the LCase command in the code below.

    Private Sub Worksheet_Change(ByVal Target As Range)
        With Target
            If .Address = "$O$36" Then
                If LCase(.Value) = "yes" Then
                    Range("$O$37:$O$44").Value = "Yes"
                Else
                    Range("$O$37:$O$44").Value = "No"
                End If
            End If
        End With
    End Sub
    I tried adding xl to LCase but the error continues. Thank you for your help.

    Excel 2000
    Last edited by proepert; 02-13-2010 at 08:44 PM. Reason: Added Excel version, sorry

  5. #5
    Forum Guru
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2003, 2007.
    Posts
    1,462

    Re: "Can't find project or library"

    proepert,

    Try:

    
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$O$36" Then
        If LCase(Target) = "yes" Then
            Range("$O$37:$O$44").Value = "Yes"
        Else
            Range("$O$37:$O$44").Value = "No"
        End If
    End If
    End Sub
    Have a great day,
    Stan
    stanleydgromjr
    Windows Vista Business, Excel 2003 and 2007

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  6. #6
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: "Can't find project or library"

    In the VBE, Tools > References, look for one that begins with MISSING and untick it.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Contributor
    Join Date
    11-17-2009
    Location
    PA USA
    MS-Off Ver
    Excel 2000
    Posts
    174

    Re: "Can't find project or library"

    Thank you very much. I still don't know what happened but as long as you guys are here, I'm good.

+ 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.2.0