![]() |
Multiple Modules, or one big one?
Some of you will know that I am gradually rewriting a huge
suite of .XLM macrosheets in VBA, and I'm learning as I go. The work done so far is now a large enough project for me to think about spreading it into several modules, instead of keeping it all in one. The advantages are obvious - but are there any disadvantages, however trivial? By the way, many many thanks to those that have helped me already - you know who you are! |
Multiple Modules, or one big one?
Any disadvantages are negligible. IMO it is the right approach, indeed a
necessary approach if you want to be able to maintain your code in the future. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Adrian" wrote in message ... Some of you will know that I am gradually rewriting a huge suite of .XLM macrosheets in VBA, and I'm learning as I go. The work done so far is now a large enough project for me to think about spreading it into several modules, instead of keeping it all in one. The advantages are obvious - but are there any disadvantages, however trivial? By the way, many many thanks to those that have helped me already - you know who you are! |
Multiple Modules, or one big one?
Adrian,
There are no disadvantages, and many advantages, to using several modules rather than one large module. Distribute procedures among modules based on their function, e.g., UDFs in one module, utility code in another, menu/command bar code in another, etc. Give each module a meaningful name rather than sticking with the default Module1, Module2, etc. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Adrian" wrote in message ... Some of you will know that I am gradually rewriting a huge suite of .XLM macrosheets in VBA, and I'm learning as I go. The work done so far is now a large enough project for me to think about spreading it into several modules, instead of keeping it all in one. The advantages are obvious - but are there any disadvantages, however trivial? By the way, many many thanks to those that have helped me already - you know who you are! |
All times are GMT +1. The time now is 03:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com