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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing Strings

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

How would one go about taking a string from a textbox, replacing each character with another defined character, then print out the results?

Ex.. Text1.text = "Test"

and say I wanted, T=Q; E=R; S=V

so then..

Text1.text = "QRSR"

Sorta like a very, very basic encryption idea.. but that's not what I am using it for. :) I think I have an idea, but I can't get it to work for me. Thanks in advance.

-Z
 
VB has a Replace function that does just what you are looking for. If you have some sort of method to your replacement character set there may be a way to use arrays and For loops to make the coding easier. Let me know if there is a method to the replacement and I will see if I can set you up with some code. If you choose to battle wits with the witless be prepared to lose.
[machinegun][ducky]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top