+ Reply to Thread
Results 1 to 4 of 4

Best practices for multiple Add-Ins?

Hybrid View

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Houston TX
    MS-Off Ver
    Excel 2007
    Posts
    19

    Best practices for multiple Add-Ins?

    Meta Question: Is there a tutorial on add-ins which gets into Best Practices, and talks about the interactions of multiple add-ins? That's rather than just the nuts and bolts of creating and loading single Add-Ins.

    With the Add-Ins I write: Should an Add-In include other Add-Ins? Or should I make a larger set of small add-ins, and load each as they are needed?

    I'm working a large number of related, smallish projects. I have a lot of code, in both class and regular modules, which I re-use from project to project. Many of these projects are delivered to other users to use on their (changing) data sets - although sometimes they just want the analysis from me. Currently, most of my reusable code is in one big Add-In. I'm thinking of splitting into separate Add-Ins so I don't have to load 30+ modules just to use a single function. But I'm not sure how that works. If Top.xlsm is using the Bottom.xlam add-in, then when I save Top as top.xlsm, does it carry the functionality of bottom along with it? Should it? When I create a new .xlsm file, should I add just the Top add-in, or load both of them separately?

    I'm primarily asking for Excel 2007, under Windows 7.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Best practices for multiple Add-Ins?

    you can set a reference to an add-in project from a macro workbook then use the code (mostly) as if it were in the macro workbook. the only thing saved with the workbook is the reference
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    12-18-2012
    Location
    Houston TX
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Best practices for multiple Add-Ins?

    @JosephP: thanks, but if I have two Add-Ins, Top and Bottom, and Top uses functions from Bottom, and Bottom is loaded when I save Top as an .xlam, then does the user have to separately load both add-ins? Or does Top drag Bottom along with it?

    As a larger question, what's the right way to organize these dependent Add-Ins in a way that's both easy on the user and the maintainer?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Best practices for multiple Add-Ins?

    if you have a reference set in Top to Bottom then Bottom will be opened when Top is loaded

    you could also simply use code in the primary add-in that loads other add-ins as required

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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