ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I run a macro from a command button in Excel? (https://www.excelbanter.com/excel-programming/323311-can-i-run-macro-command-button-excel.html)

jacchops

Can I run a macro from a command button in Excel?
 
I have created macros that I would like to run when a command button (placed
on the excel worksheet) is clicked. How can I do this?

Ken Wright

Can I run a macro from a command button in Excel?
 
View / Toolbars / Forms - Use the Grey button - When drawn it will ask you
what macro you want to assign to it. If not then right click on it and
choose assign macro.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"jacchops" wrote in message
...
I have created macros that I would like to run when a command button

(placed
on the excel worksheet) is clicked. How can I do this?




jacchops

Can I run a macro from a command button in Excel?
 
I thought I could only use those buttons on forms. I was wrong. Thank you so
much!! That couldn't have been any easier.

"Ken Wright" wrote:

View / Toolbars / Forms - Use the Grey button - When drawn it will ask you
what macro you want to assign to it. If not then right click on it and
choose assign macro.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"jacchops" wrote in message
...
I have created macros that I would like to run when a command button

(placed
on the excel worksheet) is clicked. How can I do this?





Ken Wright

Can I run a macro from a command button in Excel?
 
:-) You're welcome.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"jacchops" wrote in message
...
I thought I could only use those buttons on forms. I was wrong. Thank you

so
much!! That couldn't have been any easier.

"Ken Wright" wrote:

View / Toolbars / Forms - Use the Grey button - When drawn it will ask

you
what macro you want to assign to it. If not then right click on it and
choose assign macro.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03


--------------------------------------------------------------------------

--
It's easier to beg forgiveness than ask permission :-)


--------------------------------------------------------------------------

--

"jacchops" wrote in message
...
I have created macros that I would like to run when a command button

(placed
on the excel worksheet) is clicked. How can I do this?








All times are GMT +1. The time now is 05:14 PM.

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