B Bill Feb 23, 2005 #1 In the OnClick event, how do I sense if the Crtl key is depressed at the time of the click? Thanks, Bill
In the OnClick event, how do I sense if the Crtl key is depressed at the time of the click? Thanks, Bill
B Brendan Reynolds Feb 23, 2005 #2 You need to use the MouseDown or MouseUp events for that ... Private Sub Command6_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If (Shift And acCtrlMask) Then MsgBox "Control key was pressed" End If End Sub
You need to use the MouseDown or MouseUp events for that ... Private Sub Command6_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If (Shift And acCtrlMask) Then MsgBox "Control key was pressed" End If End Sub
B Bill Feb 23, 2005 #3 I understand how it would be that I would use the MouseDown event, but I don't understand the role of "Shift" as it appears in your code example? Bill
I understand how it would be that I would use the MouseDown event, but I don't understand the role of "Shift" as it appears in your code example? Bill
B Brendan Reynolds Feb 23, 2005 #4 This online help topic explains the MouseDown event, including the use of the Shift argument ... http://msdn.microsoft.com/library/d...us/vbaac11/html/acevtMouseDown_HV03079794.asp
This online help topic explains the MouseDown event, including the use of the Shift argument ... http://msdn.microsoft.com/library/d...us/vbaac11/html/acevtMouseDown_HV03079794.asp
B Bill Feb 23, 2005 #5 Thanks Brendan. I failed to notice the "Shift" in the arguments to MouseDown or I would have looked at the MouseDown HELP text then. Anyway, I get the whole picture now. Thanks again, Bill
Thanks Brendan. I failed to notice the "Shift" in the arguments to MouseDown or I would have looked at the MouseDown HELP text then. Anyway, I get the whole picture now. Thanks again, Bill