Results 1 to 3 of 3
  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts

    Multiple Modules (2003)

    I have a workbook (several, actually) that includes 5-10 macros. Most of them are recorded, but some were written from scratch or by modifying previously recorded macros.

    For some reason, Excel has put these macros into several different modules. The macros are fine, and their names don't conflict they just happen to have been put in a bunch of different modules (five of them in one case, named Module 1, Module 2, etc.)

    Two questions:

    1) Can I copy and paste these macros to get them all into one module, then delete the empty modules? (I'm pretty sure I can, but I don't want to ruin anything.)

    2) Why might all these modules have been created in the first place?
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    1) yes you can copy and paste in one module if desired and delete the empty modules
    2) The 2 answers that come to my mind: If you used the macro recorder to create them, new ones are created at each XL session. If you got the file from someone else they may have put them into different modules to organize them.

    Steve

  3. The Following User Says Thank You to sdckapr For This Useful Post:

    Lou Sander (2011-07-16)

  4. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    Thanks for the enlightenment!

    I'm thinking that mine arose from recording macros in many different Excel sessions.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

Posting Permissions

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