Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Adding shortkuts to Command buttons

  Asked By: Fenna    Date: Jan 19    Category: MS Office    Views: 580
  

I have an excel sheet with some macros, these macros run from buttons. now I
want to assign short cut key combination for these button. eg. Suppose I have
three buttons viz, Add module, Rename module and Delete module with
corresponding functions attached to them.
Now I want that these funtions should be called by clicking on buttons and also
by pressing any key combination (Like ALT+A, ALT+R etc) is it possible?, If yes
Then how?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Kristin Johnston     Answered On: Jan 19

Go into the macro code and change it from Private to Public
Then, back in Excel, Go
Tools/Macro/Macros (or Alt-F8)
Click on the macro (which will be called  something like
Sheet1.CommandButton1_Click)
Click Options
Enter a shortcut key  (which has to be used with Ctrl or ctrl+shift)
Put in a description
OK, Cancel

 
Didn't find what you were looking for? Find more on Adding shortkuts to Command buttons Or get search suggestion and latest updates.




Tagged: