"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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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"
 
Upvote 0
>"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.
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,101
Members
449,205
Latest member
ralemanygarcia

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