I am doing an input program that inputs to a TextBox array. I want enter to act as tab and I use SendKeys "{TAB}" for that but I can not get rid of then Pling that occures.
Any suggestions ?
Printable View
I am doing an input program that inputs to a TextBox array. I want enter to act as tab and I use SendKeys "{TAB}" for that but I can not get rid of then Pling that occures.
Any suggestions ?
Try setting the MultiLine property to True. This will get rid of the ping.
If I understood you correctly :rolleyes: you want the Enter key to act as a Tab (as in, adding a tab to the text).
First set the MultiLine to True, then instead of making it multiple lines, make it support tabs, like this:
Code:Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
Text1.SelText = vbTab
End If
End Sub
Hi Yon! I don't think AKA wanted to insert a tab when he pressed enter. But change focus to the next TextBox. He should continue to use SendKeys.
Thanks, I got the change focus working. I also learned about SelText that i will explore tomorrow.
Thanks, AKA