Hi again,

I have a huge code written, but I'm not even halfway there. Had to split couple of procedures to make everything work smoothly etc. I was wondering, would it be reasonable to put some of my code into modules, in order to avoid compiling or similar errors in future?

7 Years
Discussion Span
Last Post by deftones


For readability, I try to keep my subs and functions as small as possible. So, if I can break a piece of code out and put it somewhere so I can call it, then so it is done. If there is a piece of code that I keep repeating, I try to figure out a way to make it more general so I can encapsulate it into sub or function. So, break it out, put it in a module or even within the same form if necessary but above all don't forget to document it!

Good Luck


Well, my intention is usually the same, I mean I try to optimize the code. But it's quite a task for me, since I do not have enough experience to do that. Even though I sometimes spot some repetitive lines, but it's like I can't do much about it. But I guess practice makes perfect. Anyway, thank you once again, I'll have your advises in mind.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.