View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Using function keys in macros

See the OnKey method in help. E.g., to assign a macro to F1, use

Application.OnKey "{F1}", "MacroName"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Tha BeatMaker"

wrote in message
news:Tha.BeatMaker.1tzfuc_1124406334.2583@excelfor um-nospam.com...

Is there a way to let the function keys control a macro? For
example, I
want to write a program that will run a macro whenever you
press F1.
How would I do that?


--
Tha BeatMaker
------------------------------------------------------------------------
Tha BeatMaker's Profile:
http://www.excelforum.com/member.php...o&userid=23998
View this thread:
http://www.excelforum.com/showthread...hreadid=397040