06-07-2023, 02:47 PM
So here is my beef with Option _Explicit, and it only pertains to those variables used as a control variable in a loop. Once the loop is finished the control variable carries a value of Loop Limit +1.
If I do not DIM a control variable or I avoid using Option _ Explicit
- I'm in less danger of an unexpected value to the control variable. I will use the same variable over and over again and I can count on it's value being one of the values in range ? TO ?.
Should I need to use the control variable in a sub or function, it is only then that I Dim it
- Because my control variables are generally one letter ( x, y, etc) I'm in no danger of misspelling it
- As your program adds routines, should you need a new control variable you just create it and carry on. If you use Option _Explicit you have go back and address Dimming its type and
then back to your new creation. Depending on the size of your program this can be cumbersome
- Control variables are necessary and plentiful and often created on the fly. I feel it's a waste of time and a loss of focus to be constantly Dimming them
That's my 2 cents. Perhaps For Next should be exempt from Option _ Explicit scrutiny
Aint called Dimster for nothin.
If I do not DIM a control variable or I avoid using Option _ Explicit
- I'm in less danger of an unexpected value to the control variable. I will use the same variable over and over again and I can count on it's value being one of the values in range ? TO ?.
Should I need to use the control variable in a sub or function, it is only then that I Dim it
- Because my control variables are generally one letter ( x, y, etc) I'm in no danger of misspelling it
- As your program adds routines, should you need a new control variable you just create it and carry on. If you use Option _Explicit you have go back and address Dimming its type and
then back to your new creation. Depending on the size of your program this can be cumbersome
- Control variables are necessary and plentiful and often created on the fly. I feel it's a waste of time and a loss of focus to be constantly Dimming them
That's my 2 cents. Perhaps For Next should be exempt from Option _ Explicit scrutiny
Aint called Dimster for nothin.