ok... I think I see what you're saying, will using send keys to send the button END work? BTW if it will, how do I use send keys?
Printable View
ok... I think I see what you're saying, will using send keys to send the button END work? BTW if it will, how do I use send keys?
Using SendKeys??
Code:'Send "ABC" to Text1
Text1.SetFocus
SendKeys "ABC"
how do I send the END button (located under HOME on your keyboard)
Here you go:
That should work.Code:Private Sub txtline1_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
Select Case KeyCode
Case vbKeyLeft:
txtline1.SetFocus
SendKeys "{END}"
SendKeys "{BACKSPACE}"
Case vbKeyControl:
KeyCode = 0
Case vbKeyRight:
KeyCode = 0
Case vbKeyUp:
keyascii = 0 'keyascii? = KeyCode
Case vbKeyDown:
keyascii = 0 'keyascii? = KeyCode
Case vbKeyHome:
KeyCode = 0
Case vbKeyDelete:
KeyCode = 0
Case vbKeyEscape:
SendKeys "`", True
Case vbKeyEnd:
KeyCode = 0
Case vbKeySnapshot:
frmDOS.PrintForm
End Select
End Sub
thanks