ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problems Attaching Macros to Command Button (https://www.excelbanter.com/excel-programming/280346-problems-attaching-macros-command-button.html)

Jim[_33_]

Problems Attaching Macros to Command Button
 
I have been trying to attach a macro to a command button and have been
unable to access 'Assign Macro' as per the process listed in MS Excel
XP help as below, without much luck. The function does not seem to
come up. I have several macros written and cannot link them to
buttons. I have been able to use keyboard shortcuts i.e. Ctrl+a etc.

Is Excel needing something switched on? Does anyone know what is
wrong?

Jim

MS EXCEL XP HELP

Start a macro from a button or graphic control

*Click the button or graphic control so that sizing handles (sizing
handle: One of the small circles or squares that appears at the corners
and sides of a selected object. You drag these handles to change the
size of the object.) appear.
*With the graphic object selected, right-click a sizing handle of the
button or graphic object to display the shortcut menu (shortcut menu: A
menu that shows a list of commands relevant to a particular item. To
display a shortcut menu, right-click an item or press SHIFT+F10.).
*On the shortcut menu, click Assign Macro.

Do one of the following:
To assign an existing macro (macro: An action or a set of actions you
can use to automate tasks. Macros are recorded in the Visual Basic for
Applications programming language.) to the button or graphic object,
enter the name of the macro in the Macro name box, and then click OK.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Jan Karel Pieterse

Problems Attaching Macros to Command Button
 
Hi,

You can only "Assign macro" to the controls from the Forms
toolbar (I prefer those: simpler and less buggy).

To "assign" a macro to the controls you used (which I
guess come from the control toolbox toolbar), you simply
double-click the control in design mode or rightclick them
and choose view code.

Regards,

Jan Karel Pieterse
Excel TA/MVP

-----Original Message-----
I have been trying to attach a macro to a command button

and have been
unable to access 'Assign Macro' as per the process listed

in MS Excel
XP help as below, without much luck. The function does

not seem to
come up. I have several macros written and cannot link

them to
buttons. I have been able to use keyboard shortcuts i.e.

Ctrl+a etc.

Is Excel needing something switched on? Does anyone know

what is
wrong?

Jim

MS EXCEL XP HELP

Start a macro from a button or graphic control

*Click the button or graphic control so that sizing

handles (sizing
handle: One of the small circles or squares that appears

at the corners
and sides of a selected object. You drag these handles to

change the
size of the object.) appear.
*With the graphic object selected, right-click a sizing

handle of the
button or graphic object to display the shortcut menu

(shortcut menu: A
menu that shows a list of commands relevant to a

particular item. To
display a shortcut menu, right-click an item or press

SHIFT+F10.).
*On the shortcut menu, click Assign Macro.

Do one of the following:
To assign an existing macro (macro: An action or a set of

actions you
can use to automate tasks. Macros are recorded in the

Visual Basic for
Applications programming language.) to the button or

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

then click OK.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com