+ Reply to Thread
Results 1 to 3 of 3

Macro button on all workbooks

  1. #1
    Forum Contributor
    Join Date
    05-13-2005
    Posts
    118

    Macro button on all workbooks

    I have a small piece of code saved in a workbook. I'd like to be able to add a button on the top of any workbook that can call this code. In the customize toolbar screen, I added a button for this macro to a sample workbook, but when I clicked it it said the macro wasn't accessible.

    I can run it if the original workbook is open, and I click macros->view macros->find the right one->click run. One-click shopping would be better.

    Gary

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro button on all workbooks

    Hi,

    You don't say what version of Excel you have, nor indeed where you are located. Both of these pieces of information are useful to us when responding. When you have a moment perhaps you'd update them.

    First add the macro to your 'Personal.xlsb' workbook. Then assuming you are using XL 2007 or 2010 then just go to the Customise Quick Acces toolbar, More Commands, choose macros, find the relevant macro and drag it across to the QA toolbar pane. It's then ready for you in the Excel App.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro button on all workbooks

    You probably need to create an addin. If you have a version earlier than 2007 then you can create a menu or commandbar, see examples at the bottom of this page. later versions you can add to the Ribbon
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1