Results 1 to 4 of 4

Thread: Replace Statement

  1. #1

    Thread Starter
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Replace Statement

    im using replace statement in my project as mentioned below

    text1.text=replace(text1.text,"\"\\")
    text1.text=replace(text1.text,"("\(")
    text1.text=replace(text1.text,")"\)")

    im doing it in three steps

    is it possible to check those these three strings in a single line/ command
    ie. to use single replace to replace three strings
    įňįl

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Replace Statement

    i dont think that is possible in single statement...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3
    New Member
    Join Date
    Mar 2006
    Location
    Vidin
    Posts
    15

    Re: Replace Statement

    You can make your own function for this. You will choise how to pass parameters either in a Variant or in an Array...



    Freedom Has Its Own Style

  4. #4
    Hyperactive Member
    Join Date
    May 2005
    Posts
    307

    Re: Replace Statement

    'untested
    VB Code:
    1. Dim strCur As String
    2. Dim iCount As Long
    3.  
    4. ' whatever characters you want
    5. strCur = "!@#$%^&*()?><~`+=|\/.',{}[];:-%_ "
    6.  
    7. For iCount = 0 To Len(strCur)
    8.      text1.text = Replace(text1.text, Mid(strCur, iCount + 1, 1), "")
    9. Next

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