ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Assign a macro to a button (https://www.excelbanter.com/excel-discussion-misc-queries/169308-assign-macro-button.html)

totofab

Assign a macro to a button
 
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.

dksaluki

Assign a macro to a button
 
On Dec 11, 3:50 pm, totofab wrote:
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!

totofab

Assign a macro to a button
 
But I'm using 2007.

"dksaluki" wrote:

On Dec 11, 3:50 pm, totofab wrote:
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!


ju

Assign a macro to a button
 
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.




totofab wrote:
But I'm using 2007.

"dksaluki" wrote:

On Dec 11, 3:50 pm, totofab wrote:
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!


totofab

Assign a macro to a button
 
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.

"ju" wrote:

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.




totofab wrote:
But I'm using 2007.

"dksaluki" wrote:

On Dec 11, 3:50 pm, totofab wrote:
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!




All times are GMT +1. The time now is 07:32 AM.

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