Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
texter
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
gls858
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
 
Posts: n/a
Default 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
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
Is it possible to insert a picture using formulas? phil2401 Excel Worksheet Functions 4 December 15th 05 08:12 PM
How do I insert a reference to lookup and insert a name Jan K New Users to Excel 3 July 20th 05 10:39 AM
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM


All times are GMT +1. The time now is 02:32 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"