|
-
March 8th, 2000, 05:45 PM
#1
How to remove a selected character from the textbox?
I tried SendKeys "{del}", it works but it deletes something that needs to be remained, is there any other way to remove character?
Programs and requests for them for FREE.
http://falstok.fly.to
-
March 8th, 2000, 05:56 PM
#2
Re: How to remove a selected character from the textbox?
Maybe this isn't what you mean, but why don't you try something like this :
Private Sub Command1_Click()
Dim txt As String
With Text1
txt = ""
txt = Mid(.Text, 1, .SelStart)
txt = txt & Mid(.Text, .SelStart + .SelLength + 1, Len(.Text) - (.SelStart + .SelLength))
.Text = txt
End With
End Sub
SecretHell
If you ain't makin' waves, you ain't kickin' hard enough
-
March 8th, 2000, 06:12 PM
#3
Re: How to remove a selected character from the textbox?
If you have a normal textbox (Text1) and a button (Command1) and the text is 'Chris' with the 'i' selected, try :
private Sub Command1_Click()
'
Text1.SelText = ""
'
End Sub
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
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
|