Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
I have made this from a old post, but it doesn't work, the help screen
comes up...any ideas why? Option Explicit Sub DownRow() Range("G" & ActiveCell.row + 1).Select End Sub Sub F1On() Application.OnKey "{f1}", "DownRow" End Sub Sub F1Off() Application.OnKey "{f1}" End Sub Its modified from a Dave Pederson answer in another post. Ryk |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
It works for me. Did you run F1On before trying to use F1?
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ryk" wrote in message oups.com... I have made this from a old post, but it doesn't work, the help screen comes up...any ideas why? Option Explicit Sub DownRow() Range("G" & ActiveCell.row + 1).Select End Sub Sub F1On() Application.OnKey "{f1}", "DownRow" End Sub Sub F1Off() Application.OnKey "{f1}" End Sub Its modified from a Dave Pederson answer in another post. Ryk |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
How do i run F1On? I thought macro did all the work? Ryk |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
Ryk
Works fine in my Excel 2003. Where did you enter the code? Does the macro DownRow work on its own? All 3 should be placed into a General module. F1On must be run first to set the F1 key to run DownRow macro. Gord Dibben MS Excel MVP On 16 Oct 2006 15:07:20 -0700, "Ryk" wrote: I have made this from a old post, but it doesn't work, the help screen comes up...any ideas why? Option Explicit Sub DownRow() Range("G" & ActiveCell.row + 1).Select End Sub Sub F1On() Application.OnKey "{f1}", "DownRow" End Sub Sub F1Off() Application.OnKey "{f1}" End Sub Its modified from a Dave Pederson answer in another post. Ryk |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
Macro itself works fine, assigned it to a button. How do i run F1On? I thought macro did all the work? Ryk |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
It does, but it has to be run somehow.
Either run it manually (ToolsMacroMacros..., select it from the list, and hit Run. or put it in the Workbook Open Private Sub Workbook_BeforeClose(Cancel As Boolean) Call F10Off End Sub Private Sub Workbook_Open() Call F10On End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ryk" wrote in message s.com... How do i run F1On? I thought macro did all the work? Ryk |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
I added this....in the this workbook spot... modified it to be F1 not F10. Private Sub Workbook_BeforeClose(Cancel As Boolean) Call F1Off End Sub Private Sub Workbook_Open() Call F1On End Sub Get sub or function not defined error. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Assign F1 as a macro?
Ok Ok , seems I am not the brightest bulb, got confused, then it dawned, run the F1On macro, to assign it heheh. Works awesome, thanks guys. Ryk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create a command button, then assign macro to it in excel | Excel Discussion (Misc queries) | |||
Assign Macro | Excel Worksheet Functions | |||
I can't find the Assign Macro command | Excel Discussion (Misc queries) | |||
Assign macro name to menu command w/o using workbook name | Excel Discussion (Misc queries) | |||
assign macro | Excel Worksheet Functions |