locked
remove spaces RRS feed

  • Question

  •  I forgotton how ro remove spaces from a string?

    eg the words 'hello mike' will by 'hellmike' without spaces.

      _txt1.Text = "da" & "  s  d"
            _txt1.Text = _txt1.Text.Remove(InStr(_txt1.Text, " ") - 1, 1) 'doesnt work

     

       _txt1.Text = _txt1.Text.Replace(" ", "") 'is this the best way?
    Tuesday, January 27, 2009 6:53 AM

Answers

  • _txt1.Text = _txt1.Text.Replace(" ", "") 'is this the best way?

     

     

    Yes

    Tuesday, January 27, 2009 7:12 AM