Consulting

Results 1 to 5 of 5

Thread: Startup templates referencing other Startup templates

  1. #1
    VBAX Regular jeeves's Avatar
    Joined
    Jan 2005
    Location
    Canada
    Posts
    14
    Location

    Question Startup templates referencing other Startup templates

    So I'm customizing some existing code to work with a new startup template. I have everything working, thankfully.

    I originally had it set up this way:

    Template A - new startup template referenced Template B
    Template B - existing template in Workgroup folder that contains a reference to Template C.
    Template C - existing global template in Startup

    I ran into a memory error that I thought I caused, and in an attempt to resolve it I moved the code i was calling in Template B to a module in Template A and referenced Template C.

    So I now have it set up this way:
    Template A - Startup template with a reference to Template C
    Template C - Global Startup template

    Can anyone foresee any problems with having startup templates reference one another? I'm not too sure about copyright with merging two vendors code into one template, although I retained the vendor information commented into the code.

    BTW - the memory error I was troubleshooting turned out to reside in the original code, and not in my customizations, thank god!

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Can anyone foresee any problems with having startup templates reference one another?

    Hi,
    • As far as I know, you cannot have cyclical references. Two VBA projects cannot reference each other. (at least not at design time)
    • Always give the project a unique project name to exclude errors with setting reference and stuff.
    • Check for Name convention: Check for doubles or names that are reserved by the application.
    • Compile each project and check for syntax ore other errors..etc?
    So I now have it set up this way:
    Template A - Startup template with a reference to Template C
    Template C - Global Startup template

    Looks pretty good but perhaps you could be on a more save side.

    My favourite approach:
    • Round up all you?re functions and procedures in ONE template. (don?t matter if it?s global or not)
    • Then have you?re two ore more templates reference that ONE template instead of each other. It?s always a good idea to keep the amount off references down.
    In you?re case you would create a template B and put al the generic (Functions and stuff) code in that template

    Then Template A and C could set a reference to B

    It?s a suggestion so if the current setup works for you?leave it!
    I'm not too sure about copyright with merging two vendors code into one template, although I retained the vendor information commented into the code.

    Well this seams like the way a lot off people use other peoples stuff (if they give credits at all!)

    If you know where you got the code from you could elaborate and ask for there permission on using there code. I think that would settle it?

    Enjoy!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  3. #3
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Good advice MOS Master! Too many references is not a good idea. Consolidation into as few templates is also a good idea.

  4. #4
    VBAX Regular jeeves's Avatar
    Joined
    Jan 2005
    Location
    Canada
    Posts
    14
    Location

    Talking

    Thanks so much for the comments! I just wanted to get another opinion. I'll leave it as is, since it works and is two templates instead of one.

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by fumei
    Good advice MOS Master! Too many references is not a good idea. Consolidation into as few templates is also a good idea.
    Thanx Fumei!

    Quote Originally Posted by jeeves
    Thanks so much for the comments! I just wanted to get another opinion. I'll leave it as is, since it works and is two templates instead of one.
    You're welcome and like I said if it works without havoks don't change it...but if you come to rebuild you're sollution...you know where the serpents are!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

Posting Permissions

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