Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ewan72
 
Posts: n/a
Default assign a macro to a control button

I do not have the option to assign a macro when I right click a control
button that I have placed on a spreadsheet from the control toolbar.
However, when I insert an autoshape, I do have the option when I right click
to assign a macro. This causes an error in that the file path cannot be
found, even though the macro works when accessed the usual way.

Can anyone help me please??
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi ewan72

Press the first button on the control toolbox toolbar to go into the design
mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macroname in the event.
Press Alt-q to go back to Excel and press the first button on the
control toolbox again to exit the design mode

If you use Excel 97 Change the takefocusonclick property to false in the properties of the button



--
Regards Ron de Bruin
http://www.rondebruin.nl


"ewan72" wrote in message ...
I do not have the option to assign a macro when I right click a control
button that I have placed on a spreadsheet from the control toolbar.
However, when I insert an autoshape, I do have the option when I right click
to assign a macro. This causes an error in that the file path cannot be
found, even though the macro works when accessed the usual way.

Can anyone help me please??



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro help Jeff Garrett Excel Discussion (Misc queries) 11 December 1st 04 08:47 PM
macro interruption: help!!! mario milani Excel Discussion (Misc queries) 1 November 30th 04 06:02 PM
Shortcut keys for the disables Misha Excel Discussion (Misc queries) 9 November 29th 04 08:01 PM
How do I setup a spin button in excel Andy K Excel Discussion (Misc queries) 1 November 26th 04 09:08 PM


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"