Aug 5 2008, 10:09 AM
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..?
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:
acShiftMask The bit mask for the SHIFT key.
acCtrlMask The bit mask for the CTRL key.
acAltMask The bit mask for the ALT key.
Aug 5 2008, 10:59 AM
Nice one Alan, that's just what I needed...