#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default use F keys

Hi,

Is there a way to assign aMacro or VB code to a F-key such as F12,

Thanks
--
WayneR
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default use F keys

If you assign a macro to a Function key, it takes away the built-in program
for that key, even when you close the workbook for your macro. You can
assign a macro to any key for a letter of the alphabet and most symbols as
short cut keys without changing any of the built-in functionality of the F
keys. It is just as easy to do and to use.

"WayneR" wrote:

Hi,

Is there a way to assign aMacro or VB code to a F-key such as F12,

Thanks
--
WayneR

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default use F keys

Look at application.onkey.

Option Explicit
Sub RunMyF6Macro()
Application.OnKey "{f6}", "RunMyF6"
End Sub

Sub RunMyF6()
MsgBox "hi from F6"
End Sub

'And this would toggle it back to normal.
Sub PutItBack()
Application.OnKey "{f6}"
End Sub



WayneR wrote:

Hi,

Is there a way to assign aMacro or VB code to a F-key such as F12,

Thanks
--
WayneR


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
F- Keys Sulley Excel Worksheet Functions 2 January 26th 07 03:40 PM
Hot Keys Inspector Excel Worksheet Functions 8 December 19th 06 04:12 PM
How to use Alt keys + symbol keys to invoke a macro? keithb Excel Programming 1 December 19th 05 08:54 PM
use of F3 & F9 keys Ankur Excel Discussion (Misc queries) 2 August 10th 05 02:51 PM
hot keys ksnapp[_17_] Excel Programming 5 March 4th 04 02:08 AM


All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"