Running Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to run a macro by clicking something in a cell, kind of like using a hyperlink?

Appreciate any help,
Kelly
 
Kelly......Ceate a text box and place it some where on
your spreadsheet.

Right click on the text box and look for "assign macro".
This will let you link the specific macro to this text
box. When the button is pushed the macro runs.


-----Original Message-----
Is there a way to run a macro by clicking something in a
cell, kind of like using a hyperlink?
 
Kelly, you can create a graphic then do the following

Assign a macro to graphic control on your worksheet. When you click the button or drawing object, or change the control — for example, by clicking a check box or an item in a list — your macro will run automatically. For more information about creating a button or graphic control, click . For more information about creating drawing objects, click .

You can also run a macro from an ActiveX control. More information about creating an ActiveX control.

Click the button or graphic control so that selection handles appear.


Right-click a selection handle for the button or graphic control, and then click Assign Macro on the shortcut menu.


To assign an existing macro to the button or graphic control, enter the name of the macro in the Macro name box, and then click OK.
To record a new macro to assign to the button or graphic object, click Record.

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. How to view and edit macros.

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.
 
Kelly,

You can trigger a macro from many events associated with a worksheet
(Change, Calculate, Activate etc) but it souds like you best bet is to
insert a button from the forms menu in a cell and trigger the macro from
that.

Mike
 
Back
Top