Compile Error: Can's Find a Project or Library - Compatibility

Bovey44

New Member
Joined
Jul 4, 2020
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
I've developed several macros that include references to files/workbooks (open/close, read & write). I've provided the files and associated macros to another PC where the Microsoft Object Library is 14.0 while mine is 16.0.

I receive the error indicated in the name of this post -is the error "Compile Error: Can't Find Project or Library" caused by the difference in object library versions? And, if so - what can I do to alleviate the problem; thus, to get the macros to run on the other PC?

Thank you.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
The Office and Excel object libraries should not cause that error. What other references do you have set?
 
Upvote 0
There are four references: Visual Basic For Applications; Microsoft EXCEL 16.0 Object Library; OLE Automation; Microsoft Office 16.0 Object Library - those are the ones on my PC where I developed the code. The other PC where I'm trying to run the code has the same except it's 14.0 for the EXCEL & Office Library.
 
Upvote 0
I'm getting the compile error: can't find a project or library on open statements like this: Workbooks.Open Filename:="C:\A_CAMS_SO\LOG_SPOE=KRISTEN.xlsm"
 
Upvote 0
Those should not cause that problem, although it is the second post I have seen recently with this issue and those same 4 references. Any chance you can put the workbook somewhere for me to look at (eg Onedrive / Dropbox)? It doesn't need to have any data in it.
 
Upvote 0
Thank you, Rory for following up on my request. I'm not up-to-date on using Dropbox or sharing via Onedrive - any other suggestions? An email with the file as an attachment would have been convenient.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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