Private Sub Object_KeyPress(ByVal KeyAscii As Long)
Object The name of the ChartSpace, PivotTable or Spreadsheet object that you are trapping this event for.
KeyAscii A Long that represents the key code of the key that was pressed or released.
Remarks
This event will not be called if the BeforeKeyDown event is cancelled.
For information about using events with VBScript, see Declaring and Using Event Procedures in VBScript .
The sequence of keyboard-related events is:
- BeforeKeyDown
- KeyDown
- BeforeKeyPress
- KeyPress
- BeforeKeyUp
- KeyUp