When Right() function fails - A Solution !!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: When Right() function fails - A Solution !!

  1. #1
    Join Date
    Dec 2001

    When Right() function fails - A Solution !!

    Here is something many of us seem to run into now and then, and it can be a total mystery as to what is going wrong (Just happened to me not 10 minutes ago).

    While working on a project, suddenly you get errors for Right(), and usually the Mid() function as well. They have been working the entire time, but now vb simply "forgot" what they are! One thing that many have found is to use VBA.Right(), but you know this shouldn't be necessary. After all, it was working fine.

    So, a few minutes ago, it started doing this to one of my projects. I have two projects grouped together. The odd thing is, vb recognized the Right() function in one of the projects, but not the other! I checked the references, and found that vb had a reference to a "missing" project! It would not let me remove it, saying it was in use, even though nothing from this third project was actually being used, and it did not show up anyplace else. How could a project which does not even exist be in use anyway? Another m$ "feature" I guess...(they think of everything, don't they). Also, there were no errors while loading the project, which you would think it would give, especially when vb really likes doing that to us.

    Now for the solution. I opened the vbp file for the project which had the trouble (not the vbg file), and removed the line referencing the mystery project. Tada! Works perfect! (for now).

    Maybe this will be of some help to others...
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  2. #2
    Join Date
    Jul 2000
    Milano, Italy
    Now this is in our "sticky Faq"
    ...at present time, using mainly Net 4.0, Vs 2010

    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Feb 2002
    Makati City, Philippines
    There was once a discussion on this and have sugggested a solution here (posts #12 & #14). Since resorting to that, I never had experienced the same trouble again.
    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This a Codeguru.com survey!

HTML5 Development Center