Hello,
This thread was born out of my frustration and exhaustion of trying to find out why my macro (which is supposed to loop through a series of text files) would not work. Even worse, it would work once and then stop working. The constant error message was Runtime error '53': File not found. Online searching for a quick fix, repairing my registry, re-installing Office, and trying the same file on multiple different computers did not resolve the issue. As a last ditch attempt, I tried something desperate... I saved my code in text file as unicode so that it would only save the letters, numbers, etc without anything else and opened a fresh new workbook and pasted it. All of a sudden, the problems went away. I tried this new file on multiple computers (all running Office 2007 under Windows XP) and it worked just fine.
If I stopped here then it would be a happy ending, but unfortunately I ran the macro on several computers running Office 2007 running under Windows Vista, and sure enough the problem re-appeared: Runtime error '53': File not found.
My question is: Has anyone had this problem with Vista before when trying to loop through text files, or any othe file type for that matter? I know the files are there because I see them and I can open them, and if I replace the loop with the file path or use Application.GetOpenFilename("Text Files,*.txt"), it works and so the macro can see and open the files, but it just can't do it with the loop.
Any suggestions? (And sorry for the long post, but if I can help just one person to not to have to go through the misery that I went through, then it will have been worth it)
abousetta
P.S. attached is the new file that works under XP, but not vista and a text file that contains the needed material
Bookmarks