Alix has attended:
Excel VBA Intro Intermediate course
VBA
What is option explicit?
VBA - Option Explicit
Hi Alix
Option Explicit forces the user to make explicit declaration of all variables in a file using the Dim or ReDim statements.
If you attempt to use an undeclared variable name, an error occurs at compile time.
If used, the Option Explicit statement must appear in a the code before any other code statements.
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.
If you do not use the Option Explicit statement, all undeclared variables are of Object type.
Hope this helps
Carlos