I'm trying to automate the processing of several files, and several of the files throw up the message:
"We found a problem with some content in 'ThisFile.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click yes."
In order to get around this first message, I've been trying out:
While this works in dodging the first prompt, a subsequent prompt involving the notice of completed repair and validation comes up, requiring me to click close (sorry, I can't get a picture at this time).
This effectively seems to break the sequence and stop the code from subsequent commands. Is there a way to code to bypass this prompt as well, effectively allowing me to move on to subsequent commands?
"We found a problem with some content in 'ThisFile.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click yes."
In order to get around this first message, I've been trying out:
Code:
Dim oWB As Workbook
On Error GoTo Err_Open
Set oWB = Workbooks.Open(ThisWorkbook.Path & "\ThisFile.xlsx", CorruptLoad:=XlCorruptLoad.xlRepairFile)
Exit Sub
Err_Open:
MsgBox Err.Number & " - " & Err.Description
Err.Clear
While this works in dodging the first prompt, a subsequent prompt involving the notice of completed repair and validation comes up, requiring me to click close (sorry, I can't get a picture at this time).
This effectively seems to break the sequence and stop the code from subsequent commands. Is there a way to code to bypass this prompt as well, effectively allowing me to move on to subsequent commands?