merge VBA Modules

jallum

New Member
Joined
Sep 14, 2018
Messages
11
Hi there. I'm in the process of re-organizing a maco-enabled worksheet that was passed over to me.
There are over 100 separate modules under vba, some of which contain multiple functions and subroutines, and some that are totally empty.
Is there a way to merge all of the modules into a single module that would contain all of the VBA code, or am I stuck slogging through all of them?
 

Attachments

  • modules.jpg
    modules.jpg
    47.1 KB · Views: 15

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If there are a number of them, I would NOT put them all in one module. That would make it very hard to locate anything and hard to work with.
And there is a size limit on modules (Box).

I would recommend first deleting all the blank ones.
Then group the ones that make sense in a handful of modules (group them, according to task, function, or whatever makes sense).

It will take a little while to clean-up, but it will make it much easier to maintain and reference going forward.
 
Upvote 0
Solution
I did not realize that there was a size limit on the modules. Good to know, and a-slogging I shall go...
 
Upvote 0
I did not realize that there was a size limit on the modules. Good to know, and a-slogging I shall go...
Yeah, cleaning up other's messes is always fun!
Good luck!
 
Upvote 0
Jon Peltier of Peltier Technical Services has a utility that will list all the vba procedures by module, appropriately called List VBA Procedures by VBA Module... It might prove useful in organizing your 100+ modules.

Cheers,

Tony
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top