Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace 5

Status
Not open for further replies.

Vec

IS-IT--Management
Jan 29, 2002
418
US
How would I replace letters with numbers in a text box? For example if the user entered A, it is replaced by 1




-------------------------------------------------------------------------
-------------------------------------------------------------------------

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Univer
 
Aren't you getting rid of the spaces before it gets to the loop with:
Text1.Text = Replace(Text1.Text, " ", "")
 
I just noticed - you have the line I just mentioned at the top and at the bottom. That's where the confusion is. My suggestion will work assuming you just use the replace spaces function at the top.
 
It also depends on what is desired. The replace function, which wasn't in my original code as it wasn't needed, only takes out spaces. If there are any numbers present they may mess things up with the i as well. but if they are allowed it should work perfectly with only slight modification of the code.
 
Good point. I think we(you guys mostly) have this pretty much figured out.

Vec...is this all enough that you can go on from here?
 
My god, this is more than I could have hoped for, thank you all soooo much, I did not reply up to now because I was so busy trying all the ways, thanks again!! Stars for all!!

-------------------------------------------------------------------------
-------------------------------------------------------------------------

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Univer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top