ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Assigning a command button to a macro (https://www.excelbanter.com/excel-discussion-misc-queries/164065-assigning-command-button-macro.html)

Rich D

Assigning a command button to a macro
 
OK. I know how to record a macro, but how do I assign (attach) that macro to
a command button so all I have to do is hit the button and the macro will
execute? Help is appreciated. Thanks.
--
Rich D
Armstrong Custom Homes
Redmond

JE McGimpsey

Assigning a command button to a macro
 
If the button is from the forms toolbar, right-click the button and
choose Assign Macro.


In article ,
Rich D wrote:

OK. I know how to record a macro, but how do I assign (attach) that macro to
a command button so all I have to do is hit the button and the macro will
execute? Help is appreciated. Thanks.


Bob I

Assigning a command button to a macro
 
Is it a custom button on the Toolbar? Open Customize and r-click the
button and pick assign macro.

Rich D wrote:

OK. I know how to record a macro, but how do I assign (attach) that macro to
a command button so all I have to do is hit the button and the macro will
execute? Help is appreciated. Thanks.



Rich D

Assigning a command button to a macro
 
Both of the replies said essentially the same thing. However, I can't find
where it says "Assign Macro". I'm using the command button on the toolbar, I
right click as you said...I think...I guess I'm just a dummy. Do I right
click on the command button while still on the toolbar...all I get is the
toolbar modification list, or do I put the command button on the worksheet
and then right click...then nothing happens.
--
Rich D
Armstrong Custom Homes
Redmond


"JE McGimpsey" wrote:

If the button is from the forms toolbar, right-click the button and
choose Assign Macro.


In article ,
Rich D wrote:

OK. I know how to record a macro, but how do I assign (attach) that macro to
a command button so all I have to do is hit the button and the macro will
execute? Help is appreciated. Thanks.



Bob I

Assigning a command button to a macro
 
Open Customize, (either Tools Customize, or r-click toolbars, Customize)
then r-click the Custom button you put in the toolbar.

Rich D wrote:

Both of the replies said essentially the same thing. However, I can't find
where it says "Assign Macro". I'm using the command button on the toolbar, I
right click as you said...I think...I guess I'm just a dummy. Do I right
click on the command button while still on the toolbar...all I get is the
toolbar modification list, or do I put the command button on the worksheet
and then right click...then nothing happens.



Rich D

Assigning a command button to a macro
 
OK. I managed to get the smiley face command button on the toolbar and
assigned the macro to it. Now...how do I get my button or smiley face with
the macro attached down someplace on my worksheet? It won't click & drag.
--
Rich D
Armstrong Custom Homes
Redmond


"Bob I" wrote:

Open Customize, (either Tools Customize, or r-click toolbars, Customize)
then r-click the Custom button you put in the toolbar.

Rich D wrote:

Both of the replies said essentially the same thing. However, I can't find
where it says "Assign Macro". I'm using the command button on the toolbar, I
right click as you said...I think...I guess I'm just a dummy. Do I right
click on the command button while still on the toolbar...all I get is the
toolbar modification list, or do I put the command button on the worksheet
and then right click...then nothing happens.




Bob I

Assigning a command button to a macro
 
If you want a button in the spreadsheet, then you need the "Control
toolbox" button. Open "control toolbox", click command button, draw the
button, r-click the button, View Code, paste the macro contents into the
"click command"

Rich D wrote:

OK. I managed to get the smiley face command button on the toolbar and
assigned the macro to it. Now...how do I get my button or smiley face with
the macro attached down someplace on my worksheet? It won't click & drag.




All times are GMT +1. The time now is 08:19 PM.

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