VBA Editor not opening: insufficient memory

Viewed 32

My Visual Basic Editor stopped working. Everytime I pressed Alt F11 it would come up with an error message saying "insufficient memory" and I wasn't able to get access to my code.

I searched online and many of the recommendations suggested uninstalling and reinstalling Pack MS Office or deleting registry entries.

1 Answers

Try clearing all the data on all worksheets on the workbook. If you have to, delete all worksheets. I had the raw data stored on other files and I needed access to the code on which I had been working on all week.

When I did this I created a new version of the workbook in case anything went wrong.

Once I cleared all the worksheets and saved the file, closed it then opened it again, I was able to open VBA Editor

This solution worked for me as I was able to get back my code and paste into an earlier file that was less heavy.

For context: the VBA Code I was writing had a huge UsedRange so it was unecessarily adding data. I was going from a 1000 KB file to 100,000 KB file everytime I ran my code (I am a beginner and I'm still figuring out how to avoid using select and how to use Dim and Set instead).

Related