Which is a better technique, More modules, few routines in each modules

mark hansen

Well-known Member
Joined
Mar 6, 2006
Messages
534
Office Version
  1. 2016
Platform
  1. Windows
As I trying to get my coding better, I've been searching for advice regarding which is a better technique. More Modules, each with a unique name referring to the (perhaps) one to five related modules, or fewer modules with more routines in each module.

I have figured out it's easier to have a "Basic stuff" module I put in every project with the commonly used routines and functions... But I was wondering about all of the other project specific code.

Thanks for any advice,
Mark
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I think a lot of it is personal preference. I like to arrange my code into logical modules (what makes the most sense, from a logical standpoint). I often have a module named something like "Public Code", which is code I may use in multiple places in my other code (i.e. generic functions).

I think it is best not to bog down any one module with too much code (i.e. one module with 50 procedures!). Likewise, you wouldn't want 50 modules, each with one procedure each.
 
Upvote 0
Thanks for the insight Joe, it's always helpful to have another view on things. I can certainly understand the excessive modules or procedures in modules...

Mark
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,150
Members
453,021
Latest member
Justyna P

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