Link to home
Start Free TrialLog in
Avatar of Shanan212
Shanan212Flag for Canada

asked on

Compile Error: Can't find project or library

ContainerSearch = Trim(Me.container.Value)

Hi,

I am getting the above error on the line given and 'trim' being highlighted. Could you please let me know which library I have to enable?

The user is using Office 2003 (but the program was designed on 2010 - on my computer - which worked fine)

If the user cannot add/enable a library to make the 'trim' function work, what other alternative function can I use?

Thanks!
SOLUTION
Avatar of Preece
Preece
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Steven Carnahan
Steven Carnahan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
take a look at this Article. http://msdn.microsoft.com/en-us/library/aa190813(v=office.10).aspx 

Qoute"

Note  A run-time error will occur if the Filters property is used in conjunction with the Clear, Add, or Delete methods when applied to a Save As FileDiaog object. For example, Application.FileDialog(msoFileDialogSaveAs).Filters.Clear will result in a run-time error.


  Sorry .. wrong post ;)
Avatar of Shanan212

ASKER

Ok I talked to the user and the user said the following are checked

VB for Applications
MS Excel 12.0 Object Library
OLE Automation

He further said, there are some missing items but are not checked.

What should I do?
Didnt work either :o
That error is always due to missing references in my experience - it is nothing to do with the Trim function itself.  Make sure any reference listed as missing is removed or changed to the correct version. If you created it in 2010, it may be a reference to the Office 14 library that needs to go back to Office 11 - it's always worse going backwards :)
When you say "that needs to go back to office 11", what do you mean by that?

I just mean that if there is a reference to say 'Microsoft Office 14 Object Library', it need to be changed to 'Microsoft Office 11 Object Library' (or similar - depending on what's in the list).   You might have other reference to Excel, Word or whatever
Good find! I will check with the user!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial