1

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!

Community
  • 1
  • 1
Yucheng Guo
  • 75
  • 1
  • 7
  • Can you post the code or at least the code in the area where it highlights when the error occurs? What have you tried already? – Rodger Jul 02 '16 at 17:37
  • You have not mentioned any concrete details about the error, when it occurred, what code you followed. How do you expect SO community to help you without full information. – skkakkar Jul 02 '16 at 17:52
  • Sorry. The code shall not be posted due to non-disclosure agreement. The problem description is clear enough that the error is 35010. The problem has been solved by adding vertual memories and restart the computer. – Yucheng Guo Jul 03 '16 at 22:04
  • 2
    These down votes are unfair, the code turns out to be irrelevant to the solution... – SlowLearner Oct 22 '18 at 03:49

4 Answers4

2

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
SlowLearner
  • 3,086
  • 24
  • 54
1

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.

Yucheng Guo
  • 75
  • 1
  • 7
1

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

assylias
  • 321,522
  • 82
  • 660
  • 783
0

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.