ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Command Button for Macro on the Toolbar (https://www.excelbanter.com/new-users-excel/142398-command-button-macro-toolbar.html)

Office Junior[_2_]

Command Button for Macro on the Toolbar
 
Hi fellow Excel Users
I have a couple of questions

I know how to create a command button using The Control Toolbox

1. How do I record a macro and assign it to this command button
2. How do I get the command button to sit on my toolbar.

Many thanks in advance

Billy Liddel

Command Button for Macro on the Toolbar
 
Hi Jnr

1. Choose ToolsMacrorecord macro press the stop button when finished
recording or choose ToolsMacroStop Recording.
Right-click the command button choose Assign MAcro and click your macro.

2. If you get the command button to sit on the Toolbar it will be on every
time Excel is opened and if you click it the macro will not work so I do Not
advise to to do this.

When you are more experienced find out about adding Menus or Tool Bars
through VB. There are routines for adding Menus/toolbars and unloading them
when the Workbook closes or hiding them when when the workbook containing the
code is not the active book.

Regards
peter

1. How do I record a macro and assign it to this command button
2. How do I get the command button to sit on my toolbar.

Many thanks in advance



All times are GMT +1. The time now is 06:52 PM.

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