Здравствуйте, Magic, Вы писали:

M>Как мне в Excel перехватить нажатие пользователем клавиши на клавиатуре?


Посмотрите метод Application.OnKey — из справки Excel

Runs a specified procedure when a particular key or key combination is pressed.

expression.OnKey(Key, Procedure)

expression Required. An expression that returns an Application object.

Key Required String. A string indicating the key to be pressed.

Procedure Optional Variant. A string indicating the name of the procedure to be run. If Procedure is "" (empty text), nothing happens when Key is pressed. This form of OnKey changes the normal result of keystrokes in Microsoft Excel. If Procedure is omitted, Key reverts to its normal result in Microsoft Excel, and any special key assignments made with previous OnKey methods are cleared.

Remarks
The Key argument can specify any single key combined with ALT, CTRL, or SHIFT, or any combination of these keys. Each key is represented by one or more characters, such as "a" for the character a, or "{ENTER}" for the ENTER key.


Дальше там приведена таблица кодов
Автор: Elena_    Оценить