Procedure too large?

A

Alex

I wrote some code in VBA. It was 1190 lines in length.

Specifically I was using the <Select Case> code and I had
a total of 91 Cases, hence code was long and repetitive.

I tried to run the macro but got message <Procedure Too
Large>. From help it says code cannot exceed 64K and that
mine did.

2 questions...

1) Where do I go to see the 'K' of my code. If i am only
a small way over 64K then maybe I can trim some
superfluous code

2) Is there a limit on <cases> using <Select Case>? Like
how you can only nest 7 IF statements.

Any advice appreciated. Highly annoying to complete my
code and then see it exceeds limits. At least I learnt
something!

Thanks

Alex
 
F

Frank Kabel

Hi
not sure if there's a limit on case statement but 91 just seem to much.
Does not sound like good coding practice :))
Maybe you can post some rows of this statement and maybe it is possible
to change your logic
 
Top