Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro attached to button (Excel 2003)

    I create a book.xlt which contains some VB code to step through all worksheets in the workbook and insert headers and footers into each.
    I create a new button using Tools, Customize, Commands dragging the button to a toolbar and attach the macro to that button.
    I save as book.xlt into the XLSTART folder.
    When I copy this book.xlt to another users PC, into the same XLSTART folder, the custom button does not appear when I create a new workbook.
    I have to open the book.xlt, re-create the custom button, attach the macro and save as back to their XLSTART folder.
    It now works every time they create a new workbook.
    I need to do this on 47 computers so would appreciate some advice as to what I'm not doing or what I'm doing incorrectly.
    Thanks in advance
    Zinger

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macro attached to button (Excel 2003)

    See threads starting at <post:=407,327>post 407,327</post:> , <post:=84,102>post 84,102</post:> and <post:=23,196>post 23,196</post:> for some possible help!
    Regards,
    Rudi

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro attached to button (Excel 2003)

    Customizations to built-in toolbars are stored in your Excel11.xlb file, not in the Book.xlt template.
    One solution is to place the button on a custom toolbar and to attach the toolbar to Book.xlt. The custom toolbar will then travel with the template.
    Another solution is to create the toolbar button in code in the Workbook_Open event procedure of Book.xlt.

Posting Permissions

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