Originally Posted By: Witto
Tricky. You should not DIM the vars you used a second time in a While/Loop or a If/EndIf.


Depends.

Where it is possible you should only declare variables in the scope that they are going to be used and not in the top of the script. Most people re-use the same variable names for temporary storage or counters, and it is all too easy to accidentally overwrite a variable who's value is still required. Re-declaring the variable in the local scope avoids the problem.

Having said that, I rarely follow this good practice unless I know that there is a clash. ;\)