compile error - project or library not found:

buzz71023

Active Member
Joined
May 29, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
I have this code (below) that runs great on two of three PC's but the 3rd PC keeps getting a "compile error - project or library not found:". I've done a little research and most results came up referencing with VBIDE. Problem is I have no idea where or what that is yet. Can someone help me fix this and maybe help me understand what VBIDE is?

This is where it is getting the compile error
Code:
For Each cell In Range("C:D")

Code:
Dim myItem As String, myRNG As Range, NewLoc As String
Dim Found As Range, RackSht As Worksheet
Dim PCode As String, Lot As String

Set RackSht = Sheets("Rack Chart")

'Search for Product Code or Lot Number

myItem = InputBox("Enter what you would like to search for.", "Search", "Enter Here")
    If StrPtr(myItem) = 0 Then
        MsgBox "This action was canceled"
        Exit Sub
        Else
    If myItem = vbNullString Then
    MsgBox "There was no entries made to the inputbox. Try again"
    Exit Sub
    Else
    End If
    End If
    
Sheets("List").Select

For Each cell In Range("C:D")
    If cell.Value = myItem Then
  Set tstRNG = ActiveCell.Offset(0, 1)
                If MsgBox("Is " & cell.Value & "/" & cell.Offset(0, 1).Value & " what you searching for?", vbYesNo) = vbYes Then
            GoTo myNEXT
        Else
        End If
    End If
Next cell
 Exit Sub

''------------------------------------------------------------

myNEXT:
Range("F" & cell.Row).Select
NewLoc = ActiveCell.Value
Sheets("Rack Chart").Select
Application.ScreenUpdating = True
    ActiveSheet.Shapes(NewLoc).Select
'Turn Selection YELLOW
    With Selection.ShapeRange.Fill
            .Visible = msoTrue
            .ForeColor.RGB = RGB(255, 255, 0)
            .Transparency = 0
            .Solid
    End With
        
MsgBox ("The location of your item is " & NewLoc)
        
'Turn Selection back to BROWN
        With Selection.ShapeRange.Fill
            .Visible = msoTrue
            .ForeColor.RGB = RGB(153, 102, 51)
            .Transparency = 0
            .Solid
        End With

Range("a1").Select
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Look for missing references..

On the problematic computer
With the problematic book open
In the VBA window, while looking at the problematic code..
Click Tools - References
Is there anything there that begins with MISSING ?
 
Upvote 0
I am receiving a similar error. There are two Missing libraries, but I am not aware of using any code that requires them. Is there a way to find the line of vba code that calls the missing library?
 
Upvote 0
Welcome to the board.

Just uncheck the missing references, and run all your code.
If it doesn't error, and it works as you expect it to, then you're good to go.

There are any number of reasons a reference can be missing.
Perhaps the book was created on a different computer.
And that computer had references to a library that was needed for a completely different code.
Then the book got moved to another computer that doesn't have the same reference, but it's not actually needed anyway.
 
Upvote 0
Sorry I thought I replied to this already. I had 4 or 5 MISSING reference. I unchecked all that weren't being utilized and everything is working flawlessly on all PCs. Thanks for the responses. It truest helped. The PC it wasn't working on was my bosses who was testing the program/spreadsheet I made.

THANKS AGAIN.
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,273
Members
449,219
Latest member
daynle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top