isnoend2001
asked on
VB 6 textbox select start
I have a textbox that contains text and want to paste text after the text it contains with 1 space.
this does not work:
Private Sub txtDescription_Click()
txtDescription.SelStart = 0
txtDescription.SelText = Len(txtDescription.Text)
txtDescription.SelStart = Len(txtDescription.SelText ) + 1
End Sub
what is wrong ?
this does not work:
Private Sub txtDescription_Click()
txtDescription.SelStart = 0
txtDescription.SelText = Len(txtDescription.Text)
txtDescription.SelStart = Len(txtDescription.SelText
End Sub
what is wrong ?
ASKER
No I want to add a space and paste text to the end of the existing text
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks this works:
someStringVariable needs to be the clipboard contents
txtDescription.Text = txtDescription.Text & " "
txtDescription.SelStart = Len(txtDescription.Text) + 1
someStringVariable needs to be the clipboard contents
txtDescription.Text = txtDescription.Text & " "
txtDescription.SelStart = Len(txtDescription.Text) + 1
txtDescription.SelText = Replace(txtDescription.Tex
This will get rid of any space.