"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
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,090
Messages
5,545,893
Members
410,711
Latest member
Josh324
Top