zombiemaster
Board Regular
- Joined
- Oct 27, 2009
- Messages
- 245
I have a macro that opens a shared workbook, renames it and saves it again in a different folder, then creates the file again in the original location for that day's work. This macro is run by different team members each day, and none of them are tech-savvy.
This has been running very well for a number of years, but once in a while the file will become corrupted and will not open without clicking YES on a popup box that says this:
"We found a problem with some content in "FILE NAME". Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes."
I click yes and it opens but I get a message:
"Excel was able to open the file by repairing or removing the unreadable content.
Removed records: Named range from /xl/workbook.xml part (Workbook)"
These two popups are stopping the VBA dead and generating a run-time error, so the user stops and contacts me for help. I go into the folder, move the file myself, create a "dummy file" for the macro to see and tell the user to start over and it goes on it's merry way with the rest of the code as usual.
So - my question is two-fold.
1) is there code that can be used to automatically click "YES" on the first popup, then click "OK" on the second one so the file can then be renamed and re-saved to the next location?
2) is there a way to find out what the 'unreadable content' is, so we can avoid it from happening at all? When I click on the link that the second popup provides for the error log, all that is there is the exact same message that is on the popup about "Removed records: Named range from..."
Thanks for any help!
~ZM~
This has been running very well for a number of years, but once in a while the file will become corrupted and will not open without clicking YES on a popup box that says this:
"We found a problem with some content in "FILE NAME". Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes."
I click yes and it opens but I get a message:
"Excel was able to open the file by repairing or removing the unreadable content.
Removed records: Named range from /xl/workbook.xml part (Workbook)"
These two popups are stopping the VBA dead and generating a run-time error, so the user stops and contacts me for help. I go into the folder, move the file myself, create a "dummy file" for the macro to see and tell the user to start over and it goes on it's merry way with the rest of the code as usual.
So - my question is two-fold.
1) is there code that can be used to automatically click "YES" on the first popup, then click "OK" on the second one so the file can then be renamed and re-saved to the next location?
2) is there a way to find out what the 'unreadable content' is, so we can avoid it from happening at all? When I click on the link that the second popup provides for the error log, all that is there is the exact same message that is on the popup about "Removed records: Named range from..."
Thanks for any help!
~ZM~