"Compile Error: Out of memory" with complex userform and many vba subroutines

toole123

New Member
Joined
Feb 1, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet with a fairly complex userform that acts as a UI. I believe the issue is caused by the ammount of controls i have on my userform as it was working fine upto a point. I have already upgraded from 32 bit excel to 64 which solved the issue at an earlier stage when i had less controls but my userform is nearly complete and i am having issues again. Its likely that i am handling memory very poorly in my VBA functions so i am wondering firstly is there a way for me to just allocate more memory to excel so that i do not have to modify anything. And secondly are there any tips for how i should manage data within my subroutines. I could change my userform to contain less controls but im not sure how i can change it and still get the same affect i have now. There is too much involved in the sheet for me to post code so here is a link I know the code is messy and i could create more subroutines that can be called many times instead of writing the full function again but i dont believe this is the issue.
I would very greatly appreciate any advice.


(note not all pages are completely functional due to the out of memory error but all the controls i need to get it working at present, I will include an earlier functioning sheet to show how it should work. The spreadsheet its self is fully functional with the same functionality as the userform)
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
There are two solutions i am considering but neither is preferable.
1) Dynamically create each of the controls when required instead of having controls that are unused 90% of the time. The issue with this is the ammount of time it will take for me to implment this.
2) No longer use the userform and just reformat the exisiting sheet to have a similar look and feel. I dont like this solution as a decent ammount of time and effort has been spent already on the userform
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top