Hi everyone,
I have a macro that open and close subsequently files. Sometimes these files are corrupted causing the method workbooks.open "NameOfMyFile.xlsx" to fail. (Run time error 1004, Method 'open' of object 'workbooks' failed)
I have to open the file manually, it then says that "excel has found some unreadable content" and offer to correct the file. Once done and saved, I go back to my code and the file opens without any issue.
My question: is there a method to force a corrupt file to open, correct it and save it, so that it can be opened by using the workbooks.open method?
Thankfully
Phil
Bookmarks