Does anyone know if it makes the file larger or slower when there are lots of modules with only a few macros inside each one. I'm finding that my projects have a lot of modules, but I don't know if excel cares much one way or the other.
Does anyone know if it makes the file larger or slower when there are lots of modules with only a few macros inside each one. I'm finding that my projects have a lot of modules, but I don't know if excel cares much one way or the other.
Hi,
I can't offer a definitive answer with absolute certainty but my opinion is that it probably doesn't make the workbook any slower and almost certainly no larger other than the trivial amount of space required to store a module name.
VBA code modules are essentially only text .bas files. And I have seen advice that having more procedures in fewer modules can slow things down if oft used procedures are at the bottom of the list of procedures since VBA works from the top when looking for procedure names.
What prompts the Q? Are you observing some slow running?
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
That makes sense. I'm just going through and deleting old code and I can't believe how many modules there are. It seems like the macro recorder creates a new module every time you use it? For my OCD need to clean house, I wanted to compile related macros in the same module. And I wanted to justify the time it took me with a technical need.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks