Ashank4vba
Programmer
Hello,
I have a bunch of excel files within a folder of which some are corrupted. The corrupted excel files don't open. I get an error message of the format:
I get the above message with retry and cancel buttons.
I am asking this question in the VBA forum because, I am trying to open all the excel files in the folder using VBA and even though I use 'On Error Resume Next' to open these files, I still get the above error and code execution stops temporarily until I press cancel (after which I set it up to proceed to the next file). I don't mind not being able to read these corrupted files (although if anyone has a way I'd be thankful to hear it) but I want my code to run uninterrupted (since I have intended this a batch process to be run during non business hours.
Please help!
I have a bunch of excel files within a folder of which some are corrupted. The corrupted excel files don't open. I get an error message of the format:
Code:
<file name here> cannot be accessed. The file may be read-only or you may be trying to access a read-only location. Or , the server the document is stored on may not be respon ding.
I am asking this question in the VBA forum because, I am trying to open all the excel files in the folder using VBA and even though I use 'On Error Resume Next' to open these files, I still get the above error and code execution stops temporarily until I press cancel (after which I set it up to proceed to the next file). I don't mind not being able to read these corrupted files (although if anyone has a way I'd be thankful to hear it) but I want my code to run uninterrupted (since I have intended this a batch process to be run during non business hours.
Please help!