+ Reply to Thread
Results 1 to 3 of 3

Macros across workbooks ?

  1. #1
    Registered User
    Join Date
    07-05-2009
    Location
    Bolton, England
    MS-Off Ver
    Office / Microsoft 365
    Posts
    10

    Macros across workbooks ?

    Hi, I have a workbook that contains multiple macros that work fine on that file.

    I want to use those macros on another new file.

    I have created a personal.xlsb, (in XLStart) it loads up every time, however when I open the second workbook and activate the macro it runs on the personal.xlsb file, not the new one - phew.

    Have I missed some vba code in the orginal 'master personal.xlsb file or something else please ?

    Just stuck - help gratefully received.

    I'm using excel 2007 on a standalone pc

    Thanks - Peter

    PS THe reason is to separate the macro's from a file that is eventually sent elsewhere - so trying to protect my macro construction.

  2. #2
    Forum Contributor
    Join Date
    08-09-2012
    Location
    Anch, Alaska
    MS-Off Ver
    2003, 2010, 2013
    Posts
    131

    Re: Macros across workbooks ?

    I think your best bet is to turn your file into an Add-In.
    Do a save-as and use the file extension .xlam
    Next go to Files > Options > Add-ins > Go (bottom of dialog) > Make sure your add-in has a Check mark next to it.
    Now every time you load excel your macros will be available for your use in every workbook.

    Give this a shot, let me know how it works for you.

  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: Macros across workbooks ?

    The problem is probably because you refer to sheet names or the workbook name.

    When using code in an add-in or personal workbook always refer to

    Please Login or Register  to view this content.
    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