Procedure too large?

  • Thread starter Thread starter Alex
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Code character limit with Resize or Transpose or cell? 8
Procedure too large 2
Procedure too large 1
Dynamic macro's 5
Procedure too large 3
Procedure Too Large problems 0
Flops' new build 5
procedure too large 6

Back
Top