We should always use OPTION EXPLICIT while executing the VBA program
Option explicit should be mention at the top of the MODULE as "Option Explicit"
If we misspell any variable in program option explicit throws error message
Option explicit forces VBA to declare all the variables with DIM Statement
In the below mentioned example., we have two variables i,j,. "I" variable declared with DIM statement where as "J" variable not declared. But application executed the program by considering "J" variable against VARIANT data type.
Option Explicit doesn't allow UNDEFINED variable in program, it forces VBA to define all the variable.
Option explicit thrown error message, as variable "J" not declared
In how many ways we can mention OPTION EXPLICIT on top