Results 1 to 3 of 3

Thread: shift/question mark/control keycode

  1. #1

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    I have a form filling the screen (Blank)
    I want the user to press (shirt + ? + Control) keys
    simultaneously to trigger a msgbox.

    If this is possible?

    I need the code for this event:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

    'If keycode = what then
    'msgbox "Open Form"
    'Endif

    End Sub


  2. #2
    Member
    Join Date
    Jan 1999
    Posts
    41
    Try this code. It worked for me.

    Option Explicit

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim ShiftDown As Boolean
    Dim CtrlDown As Boolean

    ShiftDown = (Shift And vbShiftMask) > 0
    CtrlDown = (Shift And vbCtrlMask) > 0

    If CtrlDown And KeyCode = 191 And ShiftDown Then
    MsgBox "Ctrl Shift ? was pressed."
    End If

    End Sub


  3. #3

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    Thank you very much...
    Does the trick.
    Wayne

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