CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Trim() blues

  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180

    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

  2. #2
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569

    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.
    Last edited by Pinky98; April 21st, 2005 at 04:59 AM.
    Mike

  3. #3
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180

    Re: Trim() blues

    Thanks pinky
    I shall try that and get back to you.

  4. #4
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    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...

  5. #5
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054

    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.
    Marketing our skills - please participate in the survey and share your insights
    -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured