Run-time Error '1004' - Method 'Open' of object 'Workbooks' failed
OK, so far I've uninstalled & re installed Office-2010 3 to 4 times, done hours of research for 3 days with no success. I started getting this error either from Vbscript or Excel VBA, performing the same command that has worked for months. I am not sure what I may have changed, I don't recall changing anything that could cause it but I nailed it down to the
ReadOnly:=True parameter. I think something may be wrong with the registry... but re-installing should fix it right? It didn't...
Anyways, very simple command that I recorded on Excel 2010. This command WORKS FINE and the file opens:
Sub Macro1() Workbooks.Open Filename:="C:\temp\file_9928_131101.xlsx" End Sub
But when I add the ReadOnly:=True parameter, it does NOT WORK:
Sub Macro1() Workbooks.Open Filename:="C:\temp\file_9928_131101.xlsx", ReadOnly:=True End Sub
This is the returned error Run-time error '1004' Method 'Open' of object 'Workbooks' failed:
When I click Debug, the error is at the only line of code.