convert spaces to underscores

  • Thread starter Thread starter Kevin O'Brien
  • Start date Start date
K

Kevin O'Brien

Hey guys,

I have a textbox where I want to find any spaces in the text and convert
them to underscores _. Can someone please give some help with this one?

Thank you,
Kevin
 
Do I have to read the text character by character and replace as I find
spaces or can I create a vairable equal to textbox.text and run replace
against that variable.

thank you for your help.

kevin
 
I got it. This is what I did...

Dim removespaces As String
removespaces = TextBox1.Text

TextBox2.Text = Replace(removespaces, " ", "_")

Thank you,

Kevin
 
Back
Top