+ Reply to Thread
Results 1 to 3 of 3

Coding best practice question

  1. #1
    Mark Stephens
    Guest

    Coding best practice question

    I insert a module titled PubDec in my workbook and store all my public
    statements in it. Sometimes I don't use it but declare it at the top of the
    module it is being used in. Is there any advantage/disadvantage to this is
    there a 'best practice' methodology for where you should store them?

    Thanks, Mark



  2. #2
    Bob Phillips
    Guest

    Re: Coding best practice question

    I don't think there is any 'best practice' Mark.

    What I do is created a Global module if it is a big application that has
    many such variables, makes them easier to find.

    Like you, if I have just a small app, I put them in a code module.

    --
    HTH

    Bob Phillips

    "Mark Stephens" <[email protected]> wrote in message
    news:[email protected]...
    > I insert a module titled PubDec in my workbook and store all my public
    > statements in it. Sometimes I don't use it but declare it at the top of

    the
    > module it is being used in. Is there any advantage/disadvantage to this is
    > there a 'best practice' methodology for where you should store them?
    >
    > Thanks, Mark
    >
    >




  3. #3
    Jim Thomlinson
    Guest

    RE: Coding best practice question

    I concure with your reasoning. If it is a big enough application then a
    public declarations module is a great idea. The only thing I would comment on
    is the name of the module. If you fall of the face of the earth the person
    coming after you is going to have to figure out all of your abbreviations. I
    make it a practice not to abbreviate as much as possible.
    modPublicDeclarations would in my opinion be a much better name. There is no
    mistaking that is is a module containing all of your public declarations. I
    find that doing this even novices can look at my code and have some idea what
    is going on. Just my two cents.

    HTH

    "Mark Stephens" wrote:

    > I insert a module titled PubDec in my workbook and store all my public
    > statements in it. Sometimes I don't use it but declare it at the top of the
    > module it is being used in. Is there any advantage/disadvantage to this is
    > there a 'best practice' methodology for where you should store them?
    >
    > Thanks, Mark
    >
    >
    >


+ 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