This simple tip for entering VBA code can help you quickly discern mistakes.
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.