My all-time favorite tip for writing VBA code is also one of the simplest: Use lowercase letters when entering code.
When VBA recognizes keywords and other VBA reserved words, it capitalizes the appropriate letters in each component. Failure to capitalize is an immediate visual clue that you've entered something incorrectly. When this happens, check your spelling — a simple typo is the most common problem. If the spelling is correct, you've probably used the keyword inappropriately, so check the syntax.
If you enter code in proper case, this helpful and automatic clue loses its effectiveness.
Related Topics:Mobility Tech & Work CXO Software Hardware Smart Persons Guides
Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.