×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Excel macro button

Excel macro button

Excel macro button

(OP)
I have never written a macro before. I would like to start to learn how macros work. I used the macro record button to clear certain cells. I can go into the macro dropdown list and click run and the macro works perfect. I want to know how to add a button to run the macro vs going in the toolbar and clicking run every time. Can anyone explain how to insert these and name these buttons? Could not find this information in the help menu! Also I have attached an example so you can see the macro I recorded.

Thanks in advance!
 

RE: Excel macro button

Use the Customize command on the toolbar, select "Macros" which pulls up a choice between a custom menu item or custom button.  Click the custom button and drag it to one of your toolbars, right click it and "Assign Macro" to it.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Excel macro button

In addition to adding custom buttons to toolbars (handy for tasks that might apply for any workbook), you can also add a custom button to a worksheet. Having it on the worksheet limits the scope of the macro that you have to worry about and may make the relationship of the button and worksheet more obvious.

You can even assign macros to "shapes" as well. An old trick is to create a transparent rectangle (without border) and lay it over a cell. Assign a macro. Now you can click on the cell to run the macro. I use this a lot for the purpose of clicking on the cell in order to open a page linked to that cell.

RE: Excel macro button

You can also add a button to your spreadsheet.  In the Forms menu, you can add buttons and assign a macro to run when you click it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources