Textbox replace code - tutorial :D

Use this board to post your code snippets - tips and tricks
7 posts Page 1 of 1
Contributors
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Hello everyone,
I am here to show and tell everyone a simple little code :D, this will help with replacing text with. So to start it off, add a form, a button, and a textbox. :)

Next, the coding :D, let me tell you its very long, haha. jk :D
Code: Select all
TextBox1.Text = Replace(TextBox1.Text, "Haha", " ")
this code should go on the button, now i will explain what to do and where you should put certain text.

ok well the part that is highlight red
" TextBox1.Text = Replace(TextBox1.Text, "TEXT HERE", "") "
Thats where you have to put that text that is in the textbox that you want to replace

Where it is highlighted yellow, thats the text it will be replaced with :D
" TextBox1.Text = Replace(TextBox1.Text, "TEXT HERE", "I will replace Text :D") "

This is a very easy code, and very useful :D, any question, post on here , or pm me. cooll;
Image
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

thanks for this!
so this replace the text that is selected?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

no, this will replace what you put in the
" TextBox1.Text = Replace(TextBox1.Text, "TEXT HERE", "") "
where it says text here
Image
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

thats what i mean
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

zachman61 wrote:
thats what i mean
opps, ok lol sorry
Image
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

yea this is very helpful
Thanked
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Your welcome :)
Image
7 posts Page 1 of 1
Return to “Quick Snips”