Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Run Macro from a Control Button and linking to AddIn's

Fred,

There are 2 types of command buttons in Excel - ActiveX
and forms. They require different approach to program.
Most likely you have created an ActiveX button
(from "Control toolbox" toolbar) while reading help for
the Form button (from "Forms" toolbar).

To solve the problem: delete your button; open a toolbar
called "Forms" and create a new button from it. Should
work now.


Best -
Andrei


-----Original Message-----
Please can anyone help with this problem please. (Fred.)

I am following the help file to Run a Macro from a

Control Button (see
below) I have placed on one of my Sheets. As you can see

from the help
instruction below I should be able to select a control

handle then right
click and select add a Macro. the problem is when I right

click this option
isn't shown or available in the list. Do I need to set up

any references if
so which.


Also if I was to make one of my files which contained

Macros, Subs or
Functions into an Add-In, then how would I call each of

the Macros, Subs or
Functions from another New sheet assuming I had the Add-

In registered via
Tools - Add-Ins etc.

This is the Help file I am following for using the Macro

from a Button
1.. Click the button or graphic control so that sizing

handles appear.
2.. With the graphic object selected, right-click a

sizing handle of the
button or graphic object to display the shortcut menu.
3.. On the shortcut menu, click Assign Macro.
4.. Do one of the following:
a.. To assign an existing macro to the button or

graphic object, enter
the name of the macro in the Macro name box, and then

click OK.
b.. To record a new macro to assign to the selected

graphic object,
click Record. When you finish recording the macro, click

Stop Recording on
the Stop Recording toolbar.

c.. To write a new macro in the Visual Basic Editor,

click New. To edit
an existing macro, click the name of the macro in the

Macro Name box, and
then click Edit.

Note If you assign a macro to a button or other object

that is already in
use as a hyperlink, the hyperlink information is deleted.

From then on,
clicking the button or object runs the macro instead.

End of Help


Best Regards Fred



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Run Macro from a Control Button and linking to AddIn's

Thanks Andrei, that was the answer. Do you know what the code should look
like to call the Macro from the Active X.

Also do you know what the code should look like behind the button to call
Subs & Functions from an Add-In

Thanks once again.

Fred


"RADO" wrote in message
...
Fred,

There are 2 types of command buttons in Excel - ActiveX
and forms. They require different approach to program.
Most likely you have created an ActiveX button
(from "Control toolbox" toolbar) while reading help for
the Form button (from "Forms" toolbar).

To solve the problem: delete your button; open a toolbar
called "Forms" and create a new button from it. Should
work now.


Best -
Andrei


-----Original Message-----
Please can anyone help with this problem please. (Fred.)

I am following the help file to Run a Macro from a

Control Button (see
below) I have placed on one of my Sheets. As you can see

from the help
instruction below I should be able to select a control

handle then right
click and select add a Macro. the problem is when I right

click this option
isn't shown or available in the list. Do I need to set up

any references if
so which.


Also if I was to make one of my files which contained

Macros, Subs or
Functions into an Add-In, then how would I call each of

the Macros, Subs or
Functions from another New sheet assuming I had the Add-

In registered via
Tools - Add-Ins etc.

This is the Help file I am following for using the Macro

from a Button
1.. Click the button or graphic control so that sizing

handles appear.
2.. With the graphic object selected, right-click a

sizing handle of the
button or graphic object to display the shortcut menu.
3.. On the shortcut menu, click Assign Macro.
4.. Do one of the following:
a.. To assign an existing macro to the button or

graphic object, enter
the name of the macro in the Macro name box, and then

click OK.
b.. To record a new macro to assign to the selected

graphic object,
click Record. When you finish recording the macro, click

Stop Recording on
the Stop Recording toolbar.

c.. To write a new macro in the Visual Basic Editor,

click New. To edit
an existing macro, click the name of the macro in the

Macro Name box, and
then click Edit.

Note If you assign a macro to a button or other object

that is already in
use as a hyperlink, the hyperlink information is deleted.

From then on,
clicking the button or object runs the macro instead.

End of Help


Best Regards Fred





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
Getting control toolbox button to record a macro. suek Excel Discussion (Misc queries) 2 October 19th 07 12:02 AM
Linking Macro to Button? Jo[_2_] Excel Discussion (Misc queries) 1 August 2nd 07 08:44 PM
Control button / macro Sarah Excel Discussion (Misc queries) 2 February 11th 07 04:45 AM
Linking a Macro to a Button bman342 Excel Discussion (Misc queries) 3 April 10th 06 03:35 AM
assign a macro to a control button ewan72 Excel Discussion (Misc queries) 1 December 3rd 04 02:04 PM


All times are GMT +1. The time now is 02:58 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"