ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Creating Custom Commands on a Toolbar (https://www.excelbanter.com/excel-worksheet-functions/166637-creating-custom-commands-toolbar.html)

rllngriver

Creating Custom Commands on a Toolbar
 
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.



Gord Dibben

Creating Custom Commands on a Toolbar
 
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 ToolsCustomizeCommandsMacros

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



On Mon, 19 Nov 2007 10:00:01 -0800, rllngriver
wrote:

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.




All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com