Consulting

Results 1 to 2 of 2

Thread: How does Module1 differ from NewMacros?

  1. #1
    VBAX Regular
    Joined
    Aug 2004
    Location
    On a 100 acre hobby farm in beautiful west Quebec.
    Posts
    87
    Location

    Question How does Module1 differ from NewMacros?

    I've been creating and using Word macros for years. However, I've never bothered to figure out what was going on within the VBE window -- other than noting that macros I record (or VBA that I paste in when I choose Create from the Macros dialog) get added to the growing set of code.

    I do note that the area such macros get dropped into is named "NewMacros" within the Project area. Instructions in the KB typically seem to have users insert a module -- which typically becomes Module1 -- but why is this different than just adding the code to NewMacros (as seems to be done by default when recording a macro)?

    Perhaps somebody out there can provide a succinct answer about this for those of us who are reasonably comfortable with the macro part but not with the structural aspects of VBA.

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Eric,

    Welcome to VBAX!

    There is absolutely no difference at all between NewMacros and Module1 or any other standard module. They both act as containers, allowing you to organise your procedures to suit yourself. As far as Word is concerned all the procedures in all the modules are considered equal. One point to note, perhaps, is that complete references to procedures include both the procedure name and the module name and it is possible, therefore, to have two procedures with the same (unqualified) name if they are in different modules. The only other point of any sort at all is the one you have identified: Word drops all its recorded code into NewMacros ? it?s got to put them somewhere and that?s where it chooses - this is of no more significance than the fact that the recorded macros are named Macro1, Macro2, etc - they've got to have names and that is what Word chooses.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

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