-
Trim() blues
Hi guys
I am faced with an unusual error.
I am getting error "Can't find project or library" for Trim()
Alternatively I thought I would use a combination of LTrim and RTrim, but that failed too - and gave me the same error.
I am bewildered by this !!!
Please help
Suhaib
-
Re: Trim() blues
If you press F2 does Trim appear there? (should be under the "strings" module)
Does VBA appear in the list of libraries? If not then goto project->references and make sure that VISUAL BASIC FOR APPLICATIONS is checked.
-
Re: Trim() blues
Thanks pinky
I shall try that and get back to you.
-
Re: Trim() blues
Sometimes it so happens that if one of the references you have added to the project is missing, the basic functions like Trim and all don't work..
So have a look at the project-->References and check if any selected reference is having MISSING prefixed to them.. remove that and Trim and other functions should work...
-
Re: Trim() blues
It also happens if more than one references have the same member or method names. For example, if Ref1 has Trim() and Ref2 has also Trim():
This will not work:
s = Trim(Something)
The correct code would be:
s = Ref1.Trim(something)
or
s = Ref2.Trim(something)
But if you take out one of the reference -- either Ref1 or Ref2 then ...
s = Trim(Something)
...will work.