Compile Error: Procedure too large

  • Thread starter Thread starter mate
  • Start date Start date
M

mate

I have a sub function in my Personal.xls file. I need it
to be larger but keep getting the following error:
Compile Error, Procedure too large. Is there any way
around this error without having to split it into two
procedures. your help is greatly appreciated. thankyou,
mate.
 
mate said:
I have a sub function in my Personal.xls file. I need it
to be larger but keep getting the following error:
Compile Error, Procedure too large. Is there any way
around this error without having to split it into two
procedures. your help is greatly appreciated. thankyou,
mate.

obviously not, as the compiler says. Is there any reason why you do not want
to split the procedure despite of:

- enhanced readability
- extensibility
- logical structure?

just to name a few...

cheers,
Stephan
 
mate,

Try simply inserting these three lines somewhere in your big procedure, as
long as you choose a spot that isn't within a loop. They will split the
procedure at that point into two procedures, and call the second from the
first. It may help with the compiling. If your sub is one big loop, then
you will need a further redesign.

OtherProcedure
End Sub
Sub OtherProcedure()

HTH,
Bernie
MS Excel MVP
 
Back
Top