Can anyone explain why I am sometimes getting "error 70 bad file name or number" with the following code?
FileNum = FreeFile
Open "C:\MyPath\DataNew.dat" For Output As #FileNum
Print #FileNum, "Test String" '<<<< this line errors
As I said it works perfectly most of the time but I cannot see why it should ever fail.
It happens in Windows XP and Windows 7
Thanks for you help