Hello all,
I’m running a macro that is opening different Workbooks.
A lot of workbooks are corretly opened, but on some workbooks I get the following message:
“error 1004 Run-time error ‘1004’: method ‘Open’ of object ‘Workbooks’ failed”
The VBA code I use is:
Workbooks.Open Filename:=txtPadDB & “tblDBCs” & CStr(lngACT) & “.xls”, ReadOnly:=True
the strange thing is that if I choose the go to the code and the VBA editor opens, I just pres the [> continue button the code runs without a problem.
It opens some workbook, en suddenly is stops again with the same error, but again after presing [Continue] it runs that line with out an error.
What could be the problem here?
Thanks in advance for your reactions.