-
hey, i was wondering.. in a text box.. when u click a button, i want it to add a character in front of the character thats in the text box. u can do that with text1.seltext.. and it will add it to whereever u click.. but, how could i make it so, if i highlight 2 or 3 characters, and click the button, it adds something in front of those 3 characters selected, instead of just deleting them.
ex..
Hello
i highlight LLO, and click the button
He*llo .. see what i mean?
thanks
-
i think the following will do the trick:
text1.seltext = text1.seltext & "some text here"
i think it doesn't replace the text
-
'something like this?
Private Sub Command1_Click()
Dim b As String
Dim c As Integer
Dim d As Integer
Dim e As Integer
b = Text1.SelText
c = Len(Text1)
d = Len(Text1.SelText)
e = c - d
Text1 = Left(Text1, e) & "*" & b
End Sub
Private Sub Form_Load()
Text1 = "Hello"
End Sub