Results 1 to 4 of 4

Thread: Deleting few characters from a string

  1. #1

    Thread Starter
    Addicted Member rpk_20061975's Avatar
    Join Date
    Jun 2001
    Location
    India
    Posts
    234

    Question Deleting few characters from a string

    I have a string like:
    strMessage = "0x68393............"
    While reading I want to first retrieve the 0x68393 code and
    store it in a variable, and then delete this code from the
    string "strMessage".

    How to do so?
    ...............
    Rohit.

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    go to the on-line help and check out "left$" and "right$"

  3. #3
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4. Dim l_strMessage As String
    5. Dim l_strPartial As String
    6.    
    7.     l_strMessage = "0x68393............"
    8.     l_strPartial = Mid(l_strMessage, 1, InStr(1, l_strMessage, ".", vbTextCompare) - 1)
    9.     l_strMessage = Replace(l_strMessage, l_strPartial, "")
    10. End Sub

  4. #4

    Thread Starter
    Addicted Member rpk_20061975's Avatar
    Join Date
    Jun 2001
    Location
    India
    Posts
    234
    Thanks, I will try.

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