Option Explicit
If used, the Option Explicit statement must appear in a module before any procedures.
When Option Explicit appears in a module, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error occurs at compile time.
If you don't use the Option Explicit statement, all undeclared variables are of Object type.
Note Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear.
Const Statement | Dim Statement | Function Statement | Option Base Statement | Option Compare Statement | Option Private Statement | Private Statement | Public Statement | ReDim Statement | Sub Statement