can't find library error

depcdivr

Active Member
Joined
Jan 21, 2008
Messages
304
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?
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,230
Office Version
  1. 365
Platform
  1. Windows
Goto Tools>References... and check for anything marked as MISSING.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,230
Office Version
  1. 365
Platform
  1. Windows
Uncheck it.:)
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123

ADVERTISEMENT

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
 

depcdivr

Active Member
Joined
Jan 21, 2008
Messages
304
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
 

casper_pkt

New Member
Joined
Aug 7, 2007
Messages
9

ADVERTISEMENT

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.
 

depcdivr

Active Member
Joined
Jan 21, 2008
Messages
304
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.
 

Dirkasaurus

New Member
Joined
Aug 15, 2011
Messages
6
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...)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,330
Messages
5,601,000
Members
414,419
Latest member
JRDunya

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
Top