Results 1 to 2 of 2
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Melbourne, Australia
    Thanked 0 Times in 0 Posts
    how to I attach excel macro code to an excel button?

    the code is in my workbook.

    Ive created a new toolbar.

    In Word i goto the menu Tools, Customise, Macros - a list of code displays. I drag and drop the code onto my button by design.

    In Excel this isnt available or do-able.

    Can I have code in an excelbook or does the code need to be embedded in an excel template?

    any ideas?

    many thanks


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts
    You can have code in a workbook (and in a template, and in an add-in)/

    In Excel, assigning a macro to a button works as follows:
    - Select Tools | Customize...
    - Activate the Commands tab.
    - Select Macros in the list of categories on the left.
    - Drag the Custom Button (with the smiley face) from the right hand side to a toolbar and drop it there.
    - Right-click the new button on the toolbar.
    - Select Assign Macro from the popup menu.

    Warning: unlike in Word, toolbar customization is global, it's not limited to a workbook or template.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts