ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Apply code to Icon (https://www.excelbanter.com/excel-programming/403665-apply-code-icon.html)

gator

Apply code to Icon
 
How can I take some code I have on one worksheet that does formatting and
apply it to an icon that will display in the toolbar every time I open Excel
and every workbook?
--
Gator

Gord Dibben

Apply code to Icon
 
Place the code into your Personal.xls which will load hidden each time Excel is
started. Macros will be available for all open workbooks.

OR into a new workbook which you then save as an Add-in.

Load through ToolsAdd-ins and it will remain active for all open workbooks.

I either case, assign the macro to a button through

ToolsCustomizeCommandsMacros. Drag the Smiley Face to your Toolbar and

right-click and "Asign Macro".

Note: you can edit the name and image of the button.


Gord Dibben MS Excel MVP

On Fri, 4 Jan 2008 12:20:01 -0800, Gator
wrote:

How can I take some code I have on one worksheet that does formatting and
apply it to an icon that will display in the toolbar every time I open Excel
and every workbook?



gator

Apply code to Icon
 
How to I assign the sub-procedure to a macro?
--
Gator


"Gord Dibben" wrote:

Place the code into your Personal.xls which will load hidden each time Excel is
started. Macros will be available for all open workbooks.

OR into a new workbook which you then save as an Add-in.

Load through ToolsAdd-ins and it will remain active for all open workbooks.

I either case, assign the macro to a button through

ToolsCustomizeCommandsMacros. Drag the Smiley Face to your Toolbar and

right-click and "Asign Macro".

Note: you can edit the name and image of the button.


Gord Dibben MS Excel MVP

On Fri, 4 Jan 2008 12:20:01 -0800, Gator
wrote:

How can I take some code I have on one worksheet that does formatting and
apply it to an icon that will display in the toolbar every time I open Excel
and every workbook?




Gord Dibben

Apply code to Icon
 
You mean assign the macro to a button?

Right-click on the button and "Assign Macro"

If the macro is stored in an add-in you must type in the name of the macro.

If in Personal.xls just select from the dialog and OK


Gord

On Fri, 4 Jan 2008 13:31:06 -0800, Gator
wrote:

How to I assign the sub-procedure to a macro?




All times are GMT +1. The time now is 03:40 AM.

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