Creating Custom Commands on a Toolbar

R

rllngriver

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.
 
G

Gord Dibben

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
 
Top