Procedure Too Large (its not what you think)

MacroEcon1337

Board Regular
Joined
Mar 16, 2017
Messages
64
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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Also - does 'comment text affect compile size?

Or are comments destroyed when it compiles?

I have many comments :)

MC
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,937
Members
448,534
Latest member
benefuexx

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