Because I cannot execute your example (some code is missing, definition of variables ...) I created a new example hoping it is what you was trying to do.
Here is seems all is working as expected: four files created each with its different content.
But let me know
[code=thinbasic]
Uses "Biff"
Uses "Console"
Dim Counter As Number
Dim OutFile As String
Dim HeaderStr As String
For Counter = 1 To 4
OutFile = APP_SourcePath & "Test" & "-" & Counter & ".xls"
PrintL "Creating file " & OutFile
'---Create the output file
BIFF_CreateFile (OutFile)
'---Create the header string
HeaderStr = "File " & OutFile
HeaderStr += " created on " & Date$
HeaderStr += " at " & Time$
'---Write out the data
BIFF_WriteText (HeaderStr, 1, 1)
BIFF_CloseFile
Sleep 1000
Next
[/code]
Bookmarks