Assign Macro Function not available

  • Thread starter Thread starter Craig Bowden
  • Start date Start date
C

Craig Bowden

Looking for help,

After creating a command button I want to assign a macro
to that button. When I activate the shortcut menu on the
command button the "Assign Macro" option does not
display, nowhere else can I find how to assign a macro to
the command button. I'm using Excel 2002.

Thanks,
Craig.
 
Craig,

You're probably using a CommandButton from the "Controls ToolBox"
If you want to use it, go into Design Mode, Right click on it and select
"View Code". From there (in the Click Event), you can just type the name
of your macro.

Otherwise, get rid of the button and use one from the "Forms" toolbar.
You'll have the "Assign Macro" option there.

John
 
Looking for help,

After creating a command button I want to assign a macro
to that button. When I activate the shortcut menu on the
command button the "Assign Macro" option does not
display, nowhere else can I find how to assign a macro to
the command button. I'm using Excel 2002.

There are two types of command button. One is from the "Forms"
toolbar, the other is from the "Control Toolbox" toolbar. The one from
the Forms toolbar can have a macro assigned to it as you describe.
With the Controls Toolbox type, however, you enter the macro code
(including calls to other macros) into the button's Click event
procedure which will be found in the worksheet's code module.

It would seem that you've added a Control Toolbox button to your
worksheet.

To get to where you enter the code, bring up the Control Toolbox
toolbar again and click on the Design Mode button (which looks like a
set square). Now double click on the command button, which will take
you to its click event. Just enter the codd that you want to run in
there.
 
Back
Top