Results 1 to 4 of 4

Thread: how to replace a specified characters in a string to another ones?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    81

    how to replace a specified characters in a string to another ones?

    I need to replace every "a" character to "b" in a string

    plz help

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: how to replace a specified characters in a string to another ones?

    Use Replace() function:
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim strText$
    3.  
    4.     strText = "awklfjhajhgja"
    5.     strText = Replace(LCase(strText), "a", "b") 'this could be case sensitive
    6.     MsgBox strText
    7.  
    8. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    81

    Re: how to replace a specified characters in a string to another ones?

    thank u very much!

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: how to replace a specified characters in a string to another ones?

    No problem.

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