Assign a macro to a command button

G

Guest

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?
 
G

Gary Keramidas

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.
 
R

Richard Buttrey

On Fri, 8 Jul 2005 09:58:01 -0700, "Tom E" <Tom
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
__________________________
 

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