简体   繁体   中英

VBS Excel.Application.Workbooks runtime error 800A0007 Out of Memory

All my scripts stop working and returns 800a0007 Out of Memory runtime error. Till today everything was fine. There were no major changes in system (Win 7 64bit), I even uninstalled latest updates.

Basically, scripts are opening Excel instance, then opening workbook and refreshing all ODBC and Pivots. Opening excel and workbook works fine, problem is occurring when script tried to do something with workbook.

I wrote simple code (it's opening empty existing excel file), in this case error occured on line 8: Set oWorkbook = .Workbooks(workbookName).

excelFileLocation = "D:\files\"
workbookName = "test.xlsx"
Set oExcApp = CreateObject("Excel.Application")
With oExcApp 
    .Application.DisplayAlerts = False
    .Application.ScreenUpdating = False
    .Workbooks.Open excelFileLocation & workbookName
    Set oWorkbook = .Workbooks(workbookName)
    .Application.Quit
End With

There is enough space on disk, in physical memory, paging file... Error occurs running cmd/cscript from System32 and SysWOW64.

Of course I can run manually Excel, open workbook, refresh everything, save file and everything works fine.

Please, help me with this issue..

I already found solution - weird story...

I checked Applications logs in Windows Event Viewer. There was log saying that Skype for business was uninstalled. Another log says that in this same time and also from MsiInstaller was triggered configuring Office Components and few other MS Office things.

So, i disabled WMI service (i already restarted WMI earlier but it changes nothing),installed Skype again to force reconfigure some things, restarted machine and started WMI service. Now everything is ok.

It looks that removing Skype For Business was a major change :) Or it was only coincidence...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM