Run-time Error '1004' - Method 'Open' of object 'Workbooks' failed

后端 未结 8 696
故里飘歌
故里飘歌 2021-01-21 00:09

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

8条回答
  •  一整个雨季
    2021-01-21 00:45

    I was too, going crazy with Workbook.Open function, getting the weird Open fail error for no obvious reason. My code also did some some copy-pasting after Open function, which seemed to trigger it.

    Eventually I found out that turning ScreenUpdating OFF seemed to cause this - keeping ScreenUpdating ON, made things click for me (maybe someone finds this helpful in the future). I'm one of those who tends to switch ScreenUpdating off for all code whenever possible.

    Application.ScreenUpdating = False
    

提交回复
热议问题