can't find library error

depcdivr

Active Member
Joined
Jan 21, 2008
Messages
349
Office Version
  1. 365
Platform
  1. Windows
I wrote a bunch of code but am having an issue when it is run on a different computer.

When I run the code on my PC is runs fine(running XL2000) but when a co-worker runs the code(Xl2003) it results in a compile error and goes into Debug mode.

IT highlights the following line

Code:
pn_length = Len(Me.PartNumber.Value)

the error that comes up says that it can not find the library?

Anybody have any ideas on how to fix this so that it will run in both programs?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Goto Tools>References... and check for anything marked as MISSING.
 
Upvote 0
And if needed "check" the next version down you can find that's listed of the same type...

so If Microsoft Outlook 11.0 shows as missing uncheck it and find the biggest version of Microsoft Outlook you can find in the list of available libraries (ie 9.0, 10.0)

HTH
 
Upvote 0
That Fixed it. I don't know why it was trying to call an outlook library but we are back up and running. Thank you Norie
 
Upvote 0
Piggy-backed off your suggestion, and it worked for my issues (same error) - Thanks.
>>By the way, when determining the missing references from other user's systems, if that reference is not needed, you can remove that reference on your computer then recompile. This removed the reference from the project, thus eliminating the need for multiple users to update their references in order to run the code.
 
Upvote 0
That is exactly what I did. I went to the end users computer and saw which library was missing and then proceded to remove it from the file. It was an outlook library which we won't need because we don't use ms outlook anyway. Unchecked it, saved the file and all was well with the world.
 
Upvote 0
I too had this problem, moving a file from Excel 2007 to Excel 2010. It highlighted the native commands, like Len, Left, UCase, etc. When I put the prefix "VBA." in front of the commands, it recognized them, then went to the next command with an error.

Following the advice earlier in the thread, it said to go to Tools->References and find any that have the prefix of MISSING. Indeed there was a missing file from the OS. I replaced the file, used regsvr32 to register the file, rebooted Excel and loaded a fresh workbook. I took a look at the reference library and my file was no longer missing. I then tried to execute the code and everything works.

The question I have in the back of my mind is why Windows/Excel was pointing to native commands as not being associated with the native VBA library when they had nothing to do with the external OCX file that was missing? (really more of a rhetorical question...)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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