CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    After finding string in textbox, how to....

    After finding string in the textbox, how to tell vb to check characters after that string that was found for example.....vb found "Hello" but the line is "Hello 15" (where 15 can be any number from 1 to 50), how to tell vb to find out that number after "hello" and show it in msgbox...
    Thank You


  2. #2

    Re: After finding string in textbox, how to....

    Assuming string to find is in variable name sStringtoFind:


    dim sValue as string
    dim iPos as integer
    iPos = inStr(text1.text, sStringtoFind)
    sValue = trim(mid(text1.text, iPos + 1))
    msgbox sValue




    Charlie Zimmerman
    http://www.freevbcode.com


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