"Out of memory" message from VB script window

jeeves

New Member
Joined
Jul 10, 2006
Messages
5
I have VB script that is about 100K lines, and when i paste that into the VB window in Excel (I right clicked on the Workbook and Inserted a Module), I get an "Out of memory" error message.

If my script is about 65K lines, it works fine.
Apparently 100K is too big.
Does anyone know of a way I can increase some memory setting or some setting in Excel/VB such that it can take bigger VB scripts ?

thanks in advance.
sq
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

davidhall80

Well-known Member
Joined
Jul 8, 2006
Messages
663
Whenever I get that message or the "procedure to big" message, I split my macro into 2 macros. The end of my first macro commands the start of my second macro. In this example, I put an "End Sub" after what is below and then I have my second macro titled "Hide". Just make sure you make sure it is pulling from the correct module.



Application.Run "PERSONAL.XLS!Hide"
 

jeeves

New Member
Joined
Jul 10, 2006
Messages
5
>"Whenever I get that message or the "procedure to big" message, I split my macro into 2 macros"

Actually that "trick" I am already using, ie, splitting the procedures and setting up the calls such that all code is executed.

However, I am not getting a "procedure too big" message, but am getting an "Out of memory" message, which I think means that the overall
VB script code in the Module window is more than it can handle/has memory for.
 

Forum statistics

Threads
1,141,913
Messages
5,709,292
Members
421,625
Latest member
Natalie1107

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
Top