Results 1 to 4 of 4

Thread: check a string

  1. #1

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224
    is there a way to check if a string contains a character
    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Code:
    If InStr(1, String, character) <> 0 Then
      MsgBox "Character is in the String!"
    End If
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Perhaps you can try this

    Code:
    If Len(Text1) <> 0 Then
       MsgBox "The is " Len(Text) & " character(s) found in the string"
    Else
       MsgBox "No character found in the string"
    End If

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Like Operator..just finds occurance not number or occurences

    IF myString Like "*/*" then Msgbox " / involved"
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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