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 How to program a key, say F4?

Jonathan,

First, create macros that will do what you want to do. Then, assign those
macros to function keys using the OnKey method. E.g.,

Sub GoToRow1()
Application.Goto ActiveCell.EntireColumn.Cells(1, 1), True
End Sub

Sub InitKey()
Application.OnKey "{F4}","GoToRow1"
End Sub

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




"Jonathan Lee" wrote in message
...
I have a huge spreadsheet in Excel 2002 and needs to jump from predefined
rows alot. I would like to know if there is a way to program a key, say

F4,
so the cursor box will go all the way to the row 1 of the spread sheet.



Secondly, is there a way to program that key so it will jump to row 2000

and
then row 10000? Thanks.