Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
insert certain terms via hotkeys
Hi everyone, I wonder how to assign certain hotkeys in order to enter a predefined text. What I want to do is: Press F2 to enter the text "hello" F3 enters "goodday" F5 enters "see you" CTRL+K enters "good luck" and so on ... Thanks in advance for your help texter -- texter ------------------------------------------------------------------------ texter's Profile: http://www.excelforum.com/member.php...o&userid=32290 View this thread: http://www.excelforum.com/showthread...hreadid=520435 |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
insert certain terms via hotkeys
texter wrote:
Hi everyone, I wonder how to assign certain hotkeys in order to enter a predefined text. What I want to do is: Press F2 to enter the text "hello" F3 enters "goodday" F5 enters "see you" CTRL+K enters "good luck" and so on ... Thanks in advance for your help texter You might want to check out this freebie: http://www.phraseexpress.com/ gls858 |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
insert certain terms via hotkeys
The following reassigns macros to the 3 function keys:
Sub turnOnF2() Application.OnKey "{F2}", "HelloMacro" End Sub Sub turnOnF3() Application.OnKey "{F3}", "GoodDayMacro" End Sub Sub turnOnF5() Application.OnKey "{F5}", "SeeYouMacro" End Sub ============================================= The following are the actual macros themselves that enter the text: Sub HelloMacro() ActiveCell.Formula = "Hello" End Sub Sub GoodDayMacro() ActiveCell.Formula = "Good Day" End Sub Sub SeeYouMacro() ActiveCell.Formula = "See You" End Sub ============================================= The following allows you to return the function keys to their original state: Sub turnOffF2() Application.OnKey "{F2}" End Sub Sub turnOffF3() Application.OnKey "{F3}" End Sub Sub turnOffF5() Application.OnKey "{F5}" End Sub ============================================= Type this macro in the VBE, then exit the VBE back to the worksheet screen. Sub GoodLuckMacro() ActiveCell.Formula = "See You" End Sub Now do the menu sequence ToolsMacroMacros, and find the macro in the list. Click it just once just to highlight it. Click the Options button. Enter a lowercase "k" for the shortcut key. This assigns Ctrl+K as the shortcut key to enter the text "See You". (If you enter an uppercase "K", then Ctrl+Shift+K becomes the shortcut key.) I hope this helps you. |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
insert certain terms via hotkeys
Oops! correction to that last macro - should read:
Sub GoodLuckMacro() ActiveCell.Formula = "Good Luck" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to insert a picture using formulas? | Excel Worksheet Functions | |||
How do I insert a reference to lookup and insert a name | New Users to Excel | |||
insert picture | Excel Discussion (Misc queries) | |||
Challenging Charting | Charts and Charting in Excel | |||
Function to automatically insert a new sheet as a result of data entry? | Excel Worksheet Functions |