OnClick event

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

In the OnClick event, how do I sense if the Crtl key is
depressed at the time of the click?

Thanks,
Bill
 
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
 
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
 
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
 
Back
Top