XL2000: How to Determine the Key Pressed Along with Mouse Button (213736)
The information in this article applies to:
This article was previously published under Q213736 SUMMARY
Visual Basic for Applications in Microsoft Excel 2000 incorporates many more events for activating macros. Some of the new events include MouseDown, MouseUp, KeyDown, and KeyUp. One of the arguments returned by these particular events, Shift, denotes which key (SHIFT, CTRL, or ALT) on your keyboard is pressed when one of the aforementioned events is triggered.
This article provides a sample macro that shows how to use the Shift
argument returned by the MouseDown event of a command button.
REFERENCESFor more information about the MouseDown or MouseUp events, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type mousedown in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
| Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
|---|
| Keywords: | kbdtacode kbhowto kbProgramming KB213736 |
|---|
|