![excel for mac vba filesaveas excel for mac vba filesaveas](https://i.ytimg.com/vi/YPh8JYK7cxU/maxresdefault.jpg)
![excel for mac vba filesaveas excel for mac vba filesaveas](https://www.get-digital-help.com/wp-content/uploads/2010/12/create-a-abutton-form-control.png)
This example disables the Shift+Ctrl+Right Arrow key sequence. This example returns Shift+Ctrl+Right Arrow to its normal meaning. This example assigns InsertProc to the key sequence Ctrl+Plus Sign, and assigns SpecialPrintProc to the key sequence Shift+Ctrl+Right Arrow. Microsoft is aware of this and is looking into it. There is no way to currently detect the Command key in recent versions of Office VBA. To assign a procedure to one of the special characters (+, ^, %, and so on), enclose the character in braces. * (asterisk) Only applies to Mac may only work on Excel 2011 for Mac and not later versions. To specify a key combined with another key or keys, use the following table. You can also specify keys combined with Shift and/or Ctrl and/or Alt and/or Command.
#Excel for mac vba filesaveas code#
Each code in the table represents one key on the keyboard. To specify characters that aren’t displayed when you press the corresponding key (for example: Enter or Tab), use the codes listed in the following table. Each key is represented by one or more characters, such as a for the character a, or for the Enter key. The Key argument can specify any single key combined with Alt, Ctrl, or Shift, or any combination of these keys. 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. This form of OnKey changes the normal result of keystrokes in Microsoft Excel. If Procedure is «» (empty text), nothing happens when Key is pressed.
![excel for mac vba filesaveas excel for mac vba filesaveas](https://i.stack.imgur.com/OjtOz.png)
Parameters NameĪ string indicating the key to be pressed.Ī string indicating the name of the procedure to be run. Expression A variable that represents an Application object.