ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assign a macro to a command button (https://www.excelbanter.com/excel-programming/334003-assign-macro-command-button.html)

Tom E

Assign a macro to a command button
 
I have created a macro and have created a command button. I am simply trying
to assign the macro to the button. The help feature says to get the sizing
handles on the button (I have done that by going to the Design Mode), right
click on one of the sizing handles to get the shortcut menu (which I have
done), and click on "Assign Macro". That option is not on the shortcut menu.
Properties doesn't have a place to assign the macro and I don't know where
to go next. XP, Office Pro 2002, all service packs up to date. I did this
about 10 months ago with same system, etc. What am I doing wrong?

Anne Troy[_2_]

Assign a macro to a command button
 
See if this helps, Tom:
http://www.officearticles.com/misc/m...ica tions.htm
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Tom E" <Tom wrote in message
...
I have created a macro and have created a command button. I am simply

trying
to assign the macro to the button. The help feature says to get the

sizing
handles on the button (I have done that by going to the Design Mode),

right
click on one of the sizing handles to get the shortcut menu (which I have
done), and click on "Assign Macro". That option is not on the shortcut

menu.
Properties doesn't have a place to assign the macro and I don't know

where
to go next. XP, Office Pro 2002, all service packs up to date. I did

this
about 10 months ago with same system, etc. What am I doing wrong?




Gary Keramidas[_2_]

Assign a macro to a command button
 
when you right click on it, choose view code.

add the following line:

Application.Run("Your_Macro_Name")


close the code window
click design to exit design mode
click the button and see if your code runs.

--


Gary


"Tom E" <Tom wrote in message
...
I have created a macro and have created a command button. I am simply
trying
to assign the macro to the button. The help feature says to get the
sizing
handles on the button (I have done that by going to the Design Mode),
right
click on one of the sizing handles to get the shortcut menu (which I have
done), and click on "Assign Macro". That option is not on the shortcut
menu.
Properties doesn't have a place to assign the macro and I don't know where
to go next. XP, Office Pro 2002, all service packs up to date. I did
this
about 10 months ago with same system, etc. What am I doing wrong?




Richard Buttrey

Assign a macro to a command button
 
On Fri, 8 Jul 2005 09:58:01 -0700, "Tom E" <Tom
wrote:

I have created a macro and have created a command button. I am simply trying
to assign the macro to the button. The help feature says to get the sizing
handles on the button (I have done that by going to the Design Mode), right
click on one of the sizing handles to get the shortcut menu (which I have
done), and click on "Assign Macro". That option is not on the shortcut menu.
Properties doesn't have a place to assign the macro and I don't know where
to go next. XP, Office Pro 2002, all service packs up to date. I did this
about 10 months ago with same system, etc. What am I doing wrong?


Does it need to be a CommanButton from the toolbox?

Why not use a simple text box, rectangle or indeed just about any
other shape object. If you right click on one of these you'll see the
'Assign Macro' option and you just need to pick the appropriate macro.

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


All times are GMT +1. The time now is 01:36 PM.

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