VBA compile Error: unexpected error 35010

流过昼夜 提交于 2021-01-29 04:57:30

问题


I am trying to compile a big project in Excel however the unexpected error is showing up often but not always. One engineer told me that it is related to virtual memory. Can anyone please tell what should I do to eliminate this issue? Thank you!


回答1:


In my case this happened unexpectedly, the project was not particularly large. Closing the VBA host and reopening allowed the project to compile.

To fix this I'd suggest trying the simplest fixes before heading over to Advanced System Settings...

  • close reopen
  • repair document / worksheet
  • test on other user profile
  • test on other PC
  • other stuff
  • change system settings



回答2:


In control panel, go to system > Advanced system settings > Advanced tab > Performance settings > advance > change Virtual memory. Then select custom size and increase it to a reasonable amount of value. Initial size 8000, Maximum Size 15000. Click ok and restart the computer to make the change. And the problem goes away.

The explanation is that when VBA is compiling, the virtual memory gets filled up quickly when you are compiling a big project.




回答3:


In my case the workbook was corrupted. Repairing it solved the issue.




回答4:


Also, it sometimes helps to recompile the VBA code (if there is one):

  1. ALT+F11 to open the VBA-Editor.

  2. Choose menu: Debug > Compile to recompile forms and code.

  3. Reopen file.



来源:https://stackoverflow.com/questions/38162369/vba-compile-error-unexpected-error-35010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!