• Detecting Shift-Click

    Author
    Topic
    #354992

    I have attached a number of buttons to macros in my personal.xls workbook. What property (if that’s the right term) can I test from within the macro to see if the Shift key (or Control or Alt) was down when the button was clicked?

    Thanks,
    Ken

    Viewing 0 reply threads
    Author
    Replies
    • #522742

      Have a look at the thread
      VBA Code to disable NumLock

      • #522833

        Hans,

        Thanks for pointing me in the right direction. It took me a while to figure out that GetKeyState returns bit 8 on when a button is clicked with the shift key down, and bit 1 gets toggled by the key up event. Once I got that, the rest went well.

        Ken

    Viewing 0 reply threads
    Reply To: Detecting Shift-Click

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: