1) Never write procedures and functions that are longer than a full screen as these are hard to understand.
2) Always prefix your variables so you can quickly identify their datatype.
3) Never use the Variant datatype unless absolutely necessary.
4) Always use the keyword "Call" to call your procedures.
5) Always put your arguments in parentheses.
6) Never use Global variables unless absolutely necessary.
7) Always have Option Explicit at the top of your code modules to enforce variable declaration.
8) Always use tabs to indent your code to bring structure, never use spaces.
9) Add "value added" comments which explain why, do not add trivial comments.
10) Always add an Error Handler to every procedure and function.
11) Use the line continuation character to make your code more readable and to reduce the amount of scrolling.
12) Never use the Option Base or Option Compare statements.
© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext