lukesb
Aug 5 2008, 10:09 AM
Hi Everyone
Is there a way to tell if a user has held down, say the Ctrl key (I am assuming it will be pretty much the same whatever key I wish to trap for), when they have clicked on a control on a form..?
Cheers
Luke
MDM_Inc
Aug 5 2008, 10:43 AM
On the 'Mouse Down' event there is a parameter called 'Shift' that contains the value of the key that was held down while the user mouse clicked.
Here's the text from the help page:
Shift The state of the SHIFT, CTRL, and ALT keys when the button specified by the Button argument was pressed or released. If you need to test for the Shift argument, you can use one of the following intrinsic constants as bit masks:
Constant Description
acShiftMask The bit mask for the SHIFT key.
acCtrlMask The bit mask for the CTRL key.
acAltMask The bit mask for the ALT key.
Alan
lukesb
Aug 5 2008, 10:59 AM
Nice one Alan, that's just what I needed...
Cheers mate