Why Declare?
Because of the procedural nature of Visual Basic, there is no way around declaration. Even if you purge your program of Option Explicit and Dim statements, the very presence of variables, routines, and controls implies the use of declaration. So a better question than "Why declare?" is "Why declare correctly?"
Like the use of good style, a coherent system of declaration adds internal stability and organization to your source code. One of the main goals of all professional programming activity is the production of a quality application, and the effective use of declaration gives you a head start, even before you type one line of logic.
While the primary beneficiary of professional coding style is the programmer, good use of declaration ...
Get Visual Basic® Style Guide, The now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.