Hi All
I have been experimenting with exporting data to a csv file.
My procedure failed in the middle of an "export".
I now can't export anything because of a "File Already Open " error.
Can anyone tell me how to close an open file please?
I have tried using a differnt file name and closing closing down Excel but still get the same error message.
Also tried running the Close bit of the code below to no avail
iFNum = FreeFile
Open sFname For Output Access Write As #iFNum
my data export code here
e.g. Print #iFNum, HeadLine
etc. etc.
code failure in here somewhere?
Close #iFNum
Any help much appreciated
TIA
barry
OOPS!
Red face time - sorry guys!
My export code utilises a loop and my Open statement was inside the loop.
With apologies
barry
Bookmarks