06-02-2023, 12:28 PM
Hi Terry - hope I'm not taking this tread down a different road but on that Option_Explicit, do you find it highlights an "undefined variable" error when the variable is just a local loop control type. I don't DIM or DIM SHARED those loop control variables.
Ie
For XYZ = 1 to 10
XYZ$ = str$(XYZ)
FileName$ = "MyFileNumber"
File$ = FileName$ + LTrim$(XYZ$)
Print File$
Next XYZ
In this case I'm just trying to add a number to the file name and XYZ does not need to be Dimensioned as I believe it's a Single by default. But I take your suggestion as a very good one to debug for a "Duplicate Definition".
Ie
For XYZ = 1 to 10
XYZ$ = str$(XYZ)
FileName$ = "MyFileNumber"
File$ = FileName$ + LTrim$(XYZ$)
Print File$
Next XYZ
In this case I'm just trying to add a number to the file name and XYZ does not need to be Dimensioned as I believe it's a Single by default. But I take your suggestion as a very good one to debug for a "Duplicate Definition".