Assign a macro to a button

T

totofab

How do I assign a macro to a button in the Quick Access Toolbar. And run the
macro by just cliking the button and not open the macro file first.
 
D

dksaluki

How do I assign a macro to a button in the Quick Access Toolbar. And run the
macro by just cliking the button and not open the macro file first.

Right click anywhere up on the toolbar menu, go to CUSTOMIZE. In the
Customize dialogue box, click the COMMANDS tab. In the list on the
left, scroll down to MACROS. Then drag either of the buttons on the
right up to your toolbar. Now right click the new button and you'll
at the buttom: "Assign Macro...". Click that. you can also set other
things like the buttom image, what the button says, etc... enjoy!
 
T

totofab

But I'm using 2007.

dksaluki said:
Right click anywhere up on the toolbar menu, go to CUSTOMIZE. In the
Customize dialogue box, click the COMMANDS tab. In the list on the
left, scroll down to MACROS. Then drag either of the buttons on the
right up to your toolbar. Now right click the new button and you'll
at the buttom: "Assign Macro...". Click that. you can also set other
things like the buttom image, what the button says, etc... enjoy!
 
J

ju

Hi,

officebutton, excel options, customize, dropdown field change from
popular commands, to macro.
If there is code in your workbook, you will see your macro module listed
below. click the add button in the middle to move it to the right side.
it is now in the quick access toolbar.

if your workbook does not contain any code modules, you will not be able
to see anything below the macro button.

to change the face image of the button, after you have done the above,
there is a modify button near the bottom right. click it and change to
the icons shown as desired.
 
T

totofab

Did that, however when I click on the macro button I get the message "Cannot
run the macro "(macroName)". The macro may not be available in this workbook
or all macros may be disbaled". But I open the macro file (and it has to be
the active file) - and click on the button it runs fine.

Never had a problem with macro buttons in Excel 2003. Don't know what I'm
missing. Any help is appreciated.
 

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