Excel VBA: Procedure too large - doomed?

yky

Well-known Member
Joined
Jun 7, 2011
Messages
1,881
Office Version
  1. 2010
Platform
  1. Windows
I received a "procedure too large" error which, according to web search result, can be solved by splitting codes into smaller subroutines. In my case, I don't know how to do it.

My error occurs in "select case". I have more than 200 cases to process. Any idea how to split cases into smaller unit?
 
Thank you, Denis. That is exactly the same way I used to write the case codes. I have the categories from Quicken in one column, next to it is the categories in the report. I manually assign a report category to each Quicken category. On the further right column, I use the concatenate function to write codes.

The problem is assigning the category (in your example, it would be bird, mammal, etc) is done manually. If it is done programmatically, then, again, I'll face this 200+ case situation (I'd have codes like case cat insert "mammal" to the right. Something like that.) Or is there a way around it?
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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