


If a macro uses the SendKeys method, you can run that macro from and then press the Enter key, to select that command.then type E (to select the Edit command),.press Alt and typing I (to open the Insert menu),.
ASSIGN HOTKEY TO OUTLOOK MACRO MANUAL
In this example, SendKeys "%ie~" is like the manual shortcuts SendKeys could simulate a keyboard shortcut to run a menu command. In Excel 2003, and earlier versions, where there is a Menu Bar, the In this example, SendKeys "+" is like pressing ShiftĪnd tapping the F2 key, to edit the comment in the active cell. For example, the following macro inserts aĬomment with no user name, and opens that comment so it is ready for VBA page, there are macros that use the SendKeys method to openĪ comment for editing. There is a full list of the codes at the end of this page: Keys Running the macro without waiting for the keys to be processed.įor the Keys argument, you can use keys or key combinations, such

Problems, if the wrong window is active when the code runs. SendKeys Method if no other option is available, because it can cause The SendKeys method simulates keystrokes that you would manually More Excel VBA Tutorials SendKeys Warning
