Is that filename a local file?
If not, it can be that a mapped drive is (momentarily) not connected, or may even require a reboot before being connected again.
Use an error handler, and ask the user to check if the file exists and then click Retry.
VBScript Runtime Error : Open method of Workbooks class failed
Ringo
6
Reputation points
When running VBScript, the Runtime Error appear
'Open method of Workbooks class failed'
Code : 800A03EC
the line in the vbscript where it stopped is
xlApp.Workbooks.Open(Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Testing Program.xlsm")
It happened randomly, e.g. once in a week and it did not happen every time run manually or under scheduler.
May I know if anyone can shed some lights on that ?
thanks !
Developer technologies Visual Basic for Applications
1,508 questions
2 answers
Sort by: Most helpful
-
Tom van Stiphout 1,861 Reputation points MVP Volunteer Moderator
2021-01-09T20:50:39.91+00:00 -
Ringo 6 Reputation points
2021-01-20T08:57:31.237+00:00 the VBScript file is running locally under the desktop.