|
-
Nov 21st, 2000, 10:04 PM
#1
Thread Starter
New Member
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
-
Nov 21st, 2000, 11:19 PM
#2
Hyperactive Member
i think the following will do the trick:
text1.seltext = text1.seltext & "some text here"
i think it doesn't replace the text
-
Nov 21st, 2000, 11:36 PM
#3
Lively Member
'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
An ass may bray a good long time before he shakes the stars down.
T.S. Elliot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|