Hello,
With a click of a button how can i make a certain word add onto a sentence in a textbox? Thx
Printable View
Hello,
With a click of a button how can i make a certain word add onto a sentence in a textbox? Thx
Like:
VB Code:
Option Explicit Private Sub Command1_Click() Text1.Text = Text1.Text & "NewWord" End Sub
Bruce.
Do like Bruce said if it's at the end (or beginning, except inverted), though if it's somewhere in the middle, you'd have to most likely use InStr with some Mid functions. I'll write something up for you if it is in the middle. Otherwise, ignore this ;)
PS. Option Explicit makes VB raise an error any time it encounters an undeclared variable when compiling (whether to .exe or just in the IDE)
Is this a question? If you have option explicit and an undeclared avriable it won't compile. It'll show an error...Quote:
Originally posted by jemidiah
PS. Option Explicit makes VB raise an error any time it encounters an undeclared variable when compiling (whether to .exe or just in the IDE)
I guess I should have introduced that. I was actually referring to the Option Explicit in Bruce Fox's code ;)
Oh :blush:Quote:
Originally posted by jemidiah
I guess I should have introduced that. I was actually referring to the Option Explicit in Bruce Fox's code ;)