I am using the following code to loop through three files and process the data from each. I don't want to change the core functionality of this code.

Open sSummaryFileName For Append As #iSummFile
For count = 1 To 3
iTextFile = FreeFile
Open sFilename(count) For Input As #iTextFile
'Opens First Input File
Print #iSummFile, sHeader(count)
'Prints Header in Output File

Do Until EOF(iTextFile)
m_sReadString iTextFile
'Read in each Line and format
m_sWriteString iSummFile
'Write the formatted line to the Output File
Loop
Close #iTextFile
Next count

Close #iSummFile

As You can See I loop through each file at a time and then deal with the contents of each file.

My problem is as follows:
I print a header into iSummFile which changes for each of the three text file i am reading. If one of these files doesn't exist I still want the code to print a header into my final file. In other words if a file doesnt exist i only want to print the header before moving on to the next file and processing the data.