Results 1 to 5 of 5

Thread: Replace

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Replace

    do multiple replaces work like:

    Replace(str, ",", "", ".", "")

    which should remove all instances of , and . from str

    would it work?

  2. #2
    Hyperactive Member
    Join Date
    Aug 2006
    Location
    TeXaS
    Posts
    497

    Re: Replace

    no you have to do each one seperately

    from msdn help...

    Syntax

    Replace(expression, find, replacewith[, start[, count[, compare]]])

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: Replace

    how about:

    Replace(Replace(str, ".", ""), ",", "")

  4. #4
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Replace

    That should work, but it's better practice to use the constant vbNullString instead of the "".

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: Replace

    Quote Originally Posted by Comintern
    That should work, but it's better practice to use the constant vbNullString instead of the "".
    Ok. Thanks

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