ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Procedure too large (https://www.excelbanter.com/excel-programming/283213-procedure-too-large.html)

Tommi[_2_]

Procedure too large
 
Hello!
When trying run a macro I get "Procedure Too Large"
Is there some kind of limit, how large procedure can be?
Is there is, could someone help me, and please tell how large procedure can
be.

Do you have any suggestions what I should do with my procedu it contains
quite large If, for -structures

Best Regards,
Tommi Kujanpää



Dick Kusleika[_3_]

Procedure too large
 
Tommi

I don't know what the limit is and I can't find anything that tell me.

If you're getting that error, you just need to break the procedure into
smaller ones. Instead of a big If.Then construct, put that into a function
that returns the value you want. It's hard to be more specific without
seeing your code.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Tommi" wrote in message
...
Hello!
When trying run a macro I get "Procedure Too Large"
Is there some kind of limit, how large procedure can be?
Is there is, could someone help me, and please tell how large procedure

can
be.

Do you have any suggestions what I should do with my procedu it

contains
quite large If, for -structures

Best Regards,
Tommi Kujanpää





Bob Umlas[_3_]

Procedure too large
 
The limit is APPROXIMATELY 5000 lines of code in one procedure.

"Dick Kusleika" wrote in message
...
Tommi

I don't know what the limit is and I can't find anything that tell me.

If you're getting that error, you just need to break the procedure into
smaller ones. Instead of a big If.Then construct, put that into a

function
that returns the value you want. It's hard to be more specific without
seeing your code.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Tommi" wrote in message
...
Hello!
When trying run a macro I get "Procedure Too Large"
Is there some kind of limit, how large procedure can be?
Is there is, could someone help me, and please tell how large procedure

can
be.

Do you have any suggestions what I should do with my procedu it

contains
quite large If, for -structures

Best Regards,
Tommi Kujanpää







Dick Kusleika[_3_]

Procedure too large
 
Thanks Bob

Dick

"Bob Umlas" wrote in message
...
The limit is APPROXIMATELY 5000 lines of code in one procedure.

"Dick Kusleika" wrote in message
...
Tommi

I don't know what the limit is and I can't find anything that tell me.

If you're getting that error, you just need to break the procedure into
smaller ones. Instead of a big If.Then construct, put that into a

function
that returns the value you want. It's hard to be more specific without
seeing your code.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Tommi" wrote in message
...
Hello!
When trying run a macro I get "Procedure Too Large"
Is there some kind of limit, how large procedure can be?
Is there is, could someone help me, and please tell how large

procedure
can
be.

Do you have any suggestions what I should do with my procedu it

contains
quite large If, for -structures

Best Regards,
Tommi Kujanpää










All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com