PDA

View Full Version : Shortcuts? How to make them in a toolbar?



oleval
02-27-2008, 04:16 AM
Hi All,

I have my own toolbar in the template. I'd like to have macros to be run by shortcuts like "Alt+C" or something. What is the proper solution for this? Thank you!

regards,
Alexander

TonyJollans
02-27-2008, 07:57 AM
You can set your own shortcut key combinations to macros without a toolbar but if you want to do it via a toolbar, the way to set an accelerator is to precede the character in the caption with an ampersand - for example if you name your button "This is my &Macro" then Alt+M will be a shortcut for it - providing it is unique.

fumei
02-27-2008, 10:42 AM
I would have bolded that "providing it is unique", as that is a very critical point.

You can easily make any macro use a keyboard shortcut. Tools > Customize > Commands tab. Select Macros from the left list.

NOTE! Be sure to make sure you are putting the keyboard shortcut in the proper place. The default is normal.dot, which may...or may not...be the location you wish it.

GMan
04-21-2008, 11:47 AM
To take this one step further.... How would you set the Shortcut Key if the Function you want to run is not in a Menu or Toolbar.

Basically, I have a function I created to update an excel spreadsheet. To run the function I just want to press CTRL+U. (I don't care that this will overlay the Underline Shortcut).

Thanks!

fumei
04-23-2008, 10:18 AM
"How would you set the Shortcut Key if the Function you want to run is not in a Menu or Toolbar."

Read my post. You can assign a shortcut to it. You can assign a shortcut to any Function or Sub you like. It has nothing to do with whether it is in a menu or toolbar. If you want to use Ctrl-U, you will get a change on the dialog stating that it is already assigned. Just click the Assign button to overwrite.