I have a line of code that sets a workbook variable to each workbook in a folder and then runs some additional code over each workbook.
Occassionally I will get an error (Run time 1004) on the line below. If I try to open the workbook throwing the error it almost always has an unreadable content warning when I open it manually. I have turned off Display Alerts but is there something else I need to do to bypass this error?
Occassionally I will get an error (Run time 1004) on the line below. If I try to open the workbook throwing the error it almost always has an unreadable content warning when I open it manually. I have turned off Display Alerts but is there something else I need to do to bypass this error?
Code:
Application.DisplayAlerts = False
Set wb = Workbooks.Open(fileName:=myPath, UpdateLinks:=False)