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 ?
isnoend2001Asked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Why not just?

    txtDescription.Text = txtDescription.Text & " " & someStringVariable
0
 
Guru JiCommented:
You can do something like this to your text

txtDescription.SelText = Replace(txtDescription.Text, " ", "")


This will get rid of any space.
0
 
isnoend2001Author Commented:
No I want to add a space and  paste text to the end of the existing text
0
 
isnoend2001Author Commented:
Thanks this works:
someStringVariable needs to be the clipboard contents
txtDescription.Text = txtDescription.Text & " "
txtDescription.SelStart = Len(txtDescription.Text) + 1
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.