Assigning Macros to Function Keys?

J

Jane

Excel 2002, Windows XP

I would like to simplify Edit/Paste by assigning that to
the F1 key. As far as I can tell, using
Toolbars\Customize doesn't help. Also, although I can
assign a macro to a CTRL key, I haven't seen any options
for assigning the macro to one of the function keys.

Have I missed something?

Or can anyone advise on how to use VBA to do this? (I
have basic (very) knowledge of VB.)

This is a obviously not a high priority question... but I
am peeved because I know it should be do-able and don't
have the time (ability?) to figure out how to use VBA for
this.

Thank-you for your help.

Jane
 
E

Earl Kiosterud

Jane,

First, this needs to be run (it might be in the Workbook_Open event):

Sub SetUpKeys()
Application.OnKey "{F1}", "Paste"
End Sub

Now have this in the project (workbook):

Sub Paste()
ActiveSheet.Paste
End Sub

Now whenever F1 is pressed, it will run macro "Paste." Note that this will
take effect even when in another workbook and F1 is pressed.

You don't like using the standard Ctrl-v shortcut for paste? Ctrl-c for
copy, etc?
 
Top