Procedure Too Large (its not what you think)

MacroEcon1337

Board Regular
Joined
Mar 16, 2017
Messages
65
Okay it is what you think :)

1. I made a GIGANTIC code which traverses the entire workbook. And right when I was almost done, I got "procedure too large." This appears to be because the compized size of teh sub is > 64 kb.

2. I do not want to break into two subs, because the setup is so complex. And despite the size, everything is so logical and ordered.

3. What's interesting is I am RIGHT ON THE CUSP of too large - i know exactly which if statement put me over.

4. For others with similar problem, I found GREAT tips (on how to shrink compile size) here:
https://stackoverflow.com/questions/11450232/getting-error-procedure-too-large-in-vba-macros-excel


My only question here is: does variable type (ie dimming as VARIANT instead of INTEGER) affect compile size - or only run speed?

MC
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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