Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Running macros from shortcut keys

When you record a macro, you can assign it a shortcut key. Is there a way
to assign a shortcut key to a macro that already exists?

Also, is there a way to intercept function keys (like, say, F9) and run a
macro along with the normal function of the key?
I have a number of non-volatile UDF's I'd like to update when I choose,
and linking them top F9 seems a fitting thing. If there's a better way,
I'll happily accept it.

-----------
Darren
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Running macros from shortcut keys

On Sat, 18 Jun 2005 17:53:42 +0100, Darren Hill
wrote:

When you record a macro, you can assign it a shortcut key. Is there a
way to assign a shortcut key to a macro that already exists?


I've figured out the answer to the question above, but not the one below.
:)


Also, is there a way to intercept function keys (like, say, F9) and run
a macro along with the normal function of the key?
I have a number of non-volatile UDF's I'd like to update when I choose,
and linking them top F9 seems a fitting thing. If there's a better way,
I'll happily accept it.

-----------
Darren

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Running macros from shortcut keys

Have a look at Application.Volatile in help.



"Darren Hill" wrote in message
news:op.sskr3ic0ed89cl@omega...
On Sat, 18 Jun 2005 17:53:42 +0100, Darren Hill
wrote:

When you record a macro, you can assign it a shortcut key. Is there a
way to assign a shortcut key to a macro that already exists?


I've figured out the answer to the question above, but not the one below.
:)


Also, is there a way to intercept function keys (like, say, F9) and run
a macro along with the normal function of the key?
I have a number of non-volatile UDF's I'd like to update when I choose,
and linking them top F9 seems a fitting thing. If there's a better way,
I'll happily accept it.

-----------
Darren



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Running macros from shortcut keys



"Darren Hill" wrote in message
news:op.sskrvsjyed89cl@omega...
When you record a macro, you can assign it a shortcut key. Is there a way
to assign a shortcut key to a macro that already exists?


ToolsMacrosMacros... select your macro and click Options

Also, is there a way to intercept function keys (like, say, F9) and run a
macro along with the normal function of the key?
I have a number of non-volatile UDF's I'd like to update when I choose,
and linking them top F9 seems a fitting thing. If there's a better way,
I'll happily accept it.


Why not just precede the code by

Application.Volatile


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Running macros from shortcut keys

On Sat, 18 Jun 2005 18:10:47 +0100, Bob Phillips
wrote:

Why not just precede the code by

Application.Volatile


I don't want the values to update whenever the sheet is calculated, only
when I choose to. But I figured a way to do it - put a cell reference as
optional input for each of the UDF's, then have a button which sticks a
random number in that cell whenever it's clicked.
Out of curiousity, is there a way to capture key inputs like F9?

------------------
Darren


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Running macros from shortcut keys

application.onkey "{F9}","xyz"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Darren Hill" wrote in message
news:op.ssks5ev4ed89cl@omega...
On Sat, 18 Jun 2005 18:10:47 +0100, Bob Phillips
wrote:

Why not just precede the code by

Application.Volatile


I don't want the values to update whenever the sheet is calculated, only
when I choose to. But I figured a way to do it - put a cell reference as
optional input for each of the UDF's, then have a button which sticks a
random number in that cell whenever it's clicked.
Out of curiousity, is there a way to capture key inputs like F9?

------------------
Darren



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Running macros from shortcut keys

On Sat, 18 Jun 2005 19:35:35 +0100, Bob Phillips
wrote:

application.onkey "{F9}","xyz"

Am I currect in assuming this would have to be in some kind of macro that
was running constantly in the background? How would you do that? A pointer
to a webpage where I could research this myself would be fine.
Could it be in a worksheet event (I don't see a BeforeKeyRelease sadly)?

Darren
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
Macros will not run with shortcut keys Doug Excel Worksheet Functions 2 December 15th 09 09:33 PM
macros shortcut keys don't work Doug New Users to Excel 0 November 18th 09 03:04 PM
Macros Shortcut keys WSW Setting up and Configuration of Excel 1 May 14th 06 01:47 PM
Changing shortcut keys on macros WayneB Excel Worksheet Functions 2 March 13th 05 07:24 PM
listing macros associated with shortcut keys windsurferLA[_2_] Excel Programming 1 January 30th 04 05:32 PM


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"