assign macro to command button on worksheet

  • Thread starter Thread starter Mike V
  • Start date Start date
M

Mike V

I have Microsoft Office XP small business installed on my
computer which I purchased August 2001.

On my excel program, I am not able to assign a macro to a
command button on the worksheet. The assign macro option
soes not appear on the command button drop down menu.

Is this a flaw in the excel program or can I add this
option to the drop down menu.

The help instructions state that this option is available.

thanks in advance for your help
 
Only the buttons from the Forms Toolbar can be assigned macros in this
manner. You are probably using a CommandButton from the Control Toolbox,
which you have to double-click (while in design mode) to get to its
associated macro procedure.
 
Adding to Vasant:
Choose "view code" in the dropdown menu. You'll be brought to something like

Private Sub CommandButton1_Click()

End Sub

Make it look like this by performing innovative keyboard operations:

Private Sub CommandButton1_Click()
Call Macro1
End Sub

and you're done. ...Assuming that your macro is named Macro1 that is.
 
Back
Top