Pre-programming keys

  • Thread starter Thread starter Bill Ridgeway
  • Start date Start date
B

Bill Ridgeway

In some spreadsheets I need to enter a phrase in many cells. Is it possible
to pre-program the function keys with a phrase so it may be inserted into a
spreadsheet at the push of that key. If so, how can it be done?

Thanks.

Bill Ridgeway
 
Don Guillett said:
How about a nice custom menu toolbar
....

Not so simple in Excel 2007.

To answer the OP's question, it can be done for entire cell entries
from READY mode, but not in ENTER, POINT or EDIT modes. It involves
convoluted macros like


Sub foobar() 'set keystroke macros
Application.OnKey "+^{F1}", "foobar1"
Application.OnKey "+^{F2}", "foobar2"
End Sub


Sub unfoobar() 'clear keystroke macros
Application.OnKey "+^{F1}"
Application.OnKey "+^{F2}"
End Sub


Private Sub foobar1() 'one macro
ActiveCell.Value2 = "foo"
End Sub


Private Sub foobar2() 'another macro
ActiveCell.Value2 = "bar"
End Sub


Much. much, much better to use a general macro utility like AutoIt to
do this.
 
In some spreadsheets I need to enter a phrase in many cells.  Is it possible
to pre-program the function keys with a phrase so it may be inserted intoa
spreadsheet at the push of that key.  If so, how can it be done?

Thanks.

Bill Ridgeway

Does it have to be the function keys? Why not record a regular macro
and assign it to a keystroke? Or even put it up on the QAT?

Ed
 
In some spreadsheets I need to enter a phrase in many cells. Is it
possible
to pre-program the function keys with a phrase so it may be inserted into
a
spreadsheet at the push of that key. If so, how can it be done?

Thanks.

Bill Ridgeway

Does it have to be the function keys? Why not record a regular macro
and assign it to a keystroke? Or even put it up on the QAT?

Ed

Thanks Ed.
No. It doesn't have to be function keys. Just thought they are the least
used keys and wouldn't cause a conflict if used for my purpose. What's the
QAT?

Bill Ridgeway
 
What's the QAT?

In XL 2007, it's the Quick Access Toolbar. When MS introduced the
ribbon, they eliminated all the standard toolbars that we could
customize with macros and frequently used commands. Now the best you
can do is add it to the QAT.

Ed
 
Back
Top