Creating Custom Commands on a Toolbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I have tried creating a custom command by recording a macro., the
command just performs the macro on the cell that I used to record the macro,
but I would like it to be on the toolbar no matter what excel book I open and
perform the command on the specific cell or text that I select, not the cell
that I used to create the Macro.

Can someone walk me though the exact steps to do this without having to
enter a code?

Thank you.
 
You can use ActiveCell instead of Range("A1") in your code.

Or ActiveSheet or ActiveWorkbook

Store your macro(s) in your Personal.xls workbook and they will be available for
all open workbooks.

For a button available for all workbooks go to Tools>Customize>Commands>Macros

Drag the smiley face button up to a Toolbar and assign the macro to that button.

Best however if your Personal.xls creates the Toolbar and the buttons.

See Dabra Dalgleish's site for more on creating Toolbars, but it does involve
entering code.

http://www.contextures.on.ca/xlToolbar02.html


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top