How to get set of character from String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shaif
    New Member
    • Mar 2008
    • 24

    How to get set of character from String

    Hey I have a simple problem that How i can get set of character from String, such as:
    Dim s as string
    Dim s1 as string

    s="73421482716@ bffsdffhjxyz783djk";
    s1="xyz";
    How it is possible that value of s1 if in s then msgbox" Found"

    Just please give some idea or example. I dont have much knowledge abt string saperation in VB, Is there any built-in function can use to do that search?

    Thanks a lot 4 your time.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by shaif
    Hey I have a simple problem that How i can get set of character from String, such as:
    Dim s as string
    Dim s1 as string

    s="73421482716@ bffsdffhjxyz783djk";
    s1="xyz";
    How it is possible that value of s1 if in s then msgbox" Found"

    Just please give some idea or example. I dont have much knowledge abt string saperation in VB, Is there any built-in function can use to do that search?

    Thanks a lot 4 your time.
    Hello, shaif!

    Search this forum under VBTextCompare, should allow you to read from strings

    Also look up InStrB

    Good luck with the project!

    Dököll

    Comment

    • tristanlbailey
      New Member
      • Apr 2007
      • 30

      #3
      [CODE=vb]
      Dim s as string
      Dim s1 as string

      s = "73421482716@bf fsdffhjxyz783dj k"
      s1 = "xyz"

      If InStr(s, s1) Then
      MsgBox("Text Found")
      Else
      MsgBox("Text Not Found")
      End If
      [/CODE]

      Comment

      • shaif
        New Member
        • Mar 2008
        • 24

        #4
        Originally posted by tristanlbailey
        [CODE=vb]
        Dim s as string
        Dim s1 as string

        s = "73421482716@bf fsdffhjxyz783dj k"
        s1 = "xyz"

        End If
        [/CODE]
        Hey Thanks a lot Your code working 100% that i wanted.

        Comment

        Working...