Hi Chavira55,
The "Option Explicit" statement goes at the very start of the module, so it will go before your arrow code.
It's purpose is to force the programmer to explicitly declare the variables used in the module. Quote from the VBE Help files:
Used at module level to force explicit declaration of all variables in that module.
Syntax
Option Explicit
Remarks
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
, ReDim, or Static 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 Variant type unless the default type is otherwise specified with a Deftype statement.
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.
In Tom's example routine it results in the following line being added by the programmer:
Dim l As Long, t As Long, HoldTop As Double
Without it, the variables (l,t, and HoldTop) would be assumed by Excel to be Variant data types rather than those specified. Variants should, in general, be avoided if possible as they take up more memory.
HTH
PS To force yourself to use "Option Explicit", go to Tools / Options in the VBE and select the "Require Variable Declaration" box. The VBE will then automatically add the line to the start of your modules.