Results 1 to 5 of 5

Thread: please help... why isn't this code working

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    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?
    NXSupport - Your one-stop source for computer help

  2. #2
    Guest
    Using SendKeys??
    Code:
    'Send "ABC" to Text1
    Text1.SetFocus
    SendKeys "ABC"

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    how do I send the END button (located under HOME on your keyboard)
    NXSupport - Your one-stop source for computer help

  4. #4
    Guest
    Here you go:

    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
    That should work.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width