+ Reply to Thread
Results 1 to 7 of 7

Which Module Macros are Going?

  1. #1
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Which Module Macros are Going?

    On the same workbook, sometimes my macros are going into the same module and sometimes in different modules. I have no problem with either method but I would prefer to keep all macros in the same module so I know where all macros are.

    Now I have 6 modules in my VBA explorer and when I want to find (edit) a macro I have to click each module to see where my macro is.

    Is there a way to have all macros in the same module and if not is it a good practice to copy / paste a macro from one module to another?

  2. #2
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Which Module Macros are Going?

    Either you can club the code from all module & make it fit to run in one module or simply call them in one module.. may be..
    Not sure.. experts would give appropriate assistance
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Which Module Macros are Going?

    Hi Nicolas

    In general you can place all your Code in the same General Module unless it's Sheet specific Code in which case it'll go in the Sheet Module.

    However, if my Project contains a multitude of Macros, I like to use a Naming Convention for my General Modules such that the Name of the Module tells me what the Code is doing (don't use the same Name as the Code is called)...

    Module Naming Convention.jpg
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Re: Which Module Macros are Going?

    That looks good John but how do I give a new name to a module and the subsequent ones?

    Regarding your codes they all working very well and I have no issues ans as far as I know I have marked these threads as "Solved"

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Which Module Macros are Going?

    Hi Nicolas

    Go into VBA (Alt + F11)
    Click on View ---> Properties Window
    Select a Module
    Change the Name
    View.jpg Change Name.jpg

  6. #6
    Forum Contributor
    Join Date
    09-29-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2013
    Posts
    222

    Re: Which Module Macros are Going?

    It is so easy, thanks John.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Which Module Macros are Going?

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] After renaming module, macros can no longer be called using application.run
    By tblasko in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2017, 08:37 PM
  2. Compile error in hidden module: Module 1 when workbook opened on different machine!?
    By MathUKTeacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2015, 04:38 PM
  3. Replies: 2
    Last Post: 02-15-2015, 11:36 AM
  4. Why are certain Macros grouped in a single Module?
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-25-2012, 04:52 AM
  5. Combining individual macros into one module/macro
    By Nett in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-20-2010, 03:00 AM
  6. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM
  7. Managing Modules/Macros - More than one Module FOLDER?
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2005, 10:05 AM

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