Macro Execution Button On Worksheet
Macro Execution Button On Worksheet
(OP)
I've seen Excel worksheets before where the user has a macro embedded as a button on the worksheet space itself and not in the toolbar. Apparently they took a few cells and made some sort of button with them and pointed those to a macro. Could anybody direct how to go about doing this or where this feature is at in the excel help? I found some things on adding buttons to the toolbars but I would rather do this on the sheet as others will be using this and looking in the toolbar isn't an obvious place to have something.
Thanks in advance!
-Brian
Thanks in advance!
-Brian





RE: Macro Execution Button On Worksheet
view
toolbars
forms
press the button on the palette that pops up.
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Macro Execution Button On Worksheet
I am just going to add to the method that GregLocock has suggested and clarify that a bit.
1) write or record the Macro of interest
2) Click on View > ToolBars >Forms
3) then click on the BUTTON (Command Button) ... the cursor will turn into cross hair
4) draw a rectangle on the spreadsheet where you want to place the macro button
5) the rectangle that you have drawn will turn into a BUTTON (Command Button)
6) Right Click on the BUTTON and assign the related Macro to it.
7) You may also optionally rename the BUTTON as your Macro name
Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
http://www.energyefficientbuild.com
RE: Macro Execution Button On Worksheet
I believe the Forms toolbar was native to Excel (since Excel 4 or 5) and stuck around for compatibility, the Controls toolbar is the Office-wide method.
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Macro Execution Button On Worksheet
-Brian
RE: Macro Execution Button On Worksheet
RE: Macro Execution Button On Worksheet
It might not be an "official" control button but works very well for this use.
RE: Macro Execution Button On Worksheet
I read once about a trick of drawing rectangles over a cell, turning off all colour and borders for the rectangle so that it is quite invisible, then associating a macro with the rectangle. The result is that "clicking" on the cell runs the associated macro. I use this technique quite often on a particular class of workbooks.
RE: Macro Execution Button On Worksheet
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.