Command Button for Macro on the Toolbar

G

Guest

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
 
G

Guest

Hi Jnr

1. Choose >Tools>Macro>record macro press the stop button when finished
recording or choose >Tools>Macro>Stop 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
 

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

Top