Search code examples
excelwindows-7vba

I need ASCII code for F1 - F12 function keys. How can I store function keys action in excel sheet's cell?


I need ASCII code for F1 - F12 function keys. How can I store function keys action in excel sheet's cell?

I need to use the function keys function by referring in excel cell to automate.


Solution

  • It would be great to describe your needs in more details. Why do you need to store function keys? I don't think that there are ASCII codes for function keys but you can probably use sendkeys and onkey. This allows to send and capture the "F1-F15" key press command. Please see:

    http://www.rondebruin.nl/win/s4/win012.htm

    https://msdn.microsoft.com/de-de/library/office/ff197461.aspx