Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Procedure too large

Hi Group,

I am getting a message, "Procedure too large", there is a limit on the
amount of code that be be executed? This means I have to eliminate some of
the code?

Thanks,
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Procedure too large

Hello

See http://www.mrexcel.com/archive2/63500/73583.htm


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"David" wrote:

Hi Group,

I am getting a message, "Procedure too large", there is a limit on the
amount of code that be be executed? This means I have to eliminate some of
the code?

Thanks,
David

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Procedure too large

If you are getting a message that a procedure is too large for the compiler,
then your procedure is *definitely* too large by any other measure. There
is a limit imposed by the compiler, but well-written code should never
approach that limit. You don't have to "eliminate" any code, but you need to
move code out that procedure and put it into a procedure that is called by
the main procedure. E.g., instead of

Sub AAA()
' do lots of stuff for task #1
' do lots of stuff for task #2
' do lots of stuff for task #3
End Sub

use structured code like

Sub AAA()
CallToOtherProcForTask1
CallToOtherProcForTask2
CallToOtherProcForTask3
End Sub

Sub CallToOtherProcForTask1
' code for task 1
End Sub

Sub CallToOtherProcForTask2
' code for task 2
End Sub

Sub CallToOtherProcForTask3
' code for task 3
End Sub



--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"David" wrote in message
...
Hi Group,

I am getting a message, "Procedure too large", there is a limit on the
amount of code that be be executed? This means I have to eliminate some of
the code?

Thanks,
David


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Procedure too large

Thanks Chip. I did a lookup on "Procedure too large" and this is what the
partners in crime suggested also. And it works great.



"Chip Pearson" wrote:

If you are getting a message that a procedure is too large for the compiler,
then your procedure is *definitely* too large by any other measure. There
is a limit imposed by the compiler, but well-written code should never
approach that limit. You don't have to "eliminate" any code, but you need to
move code out that procedure and put it into a procedure that is called by
the main procedure. E.g., instead of

Sub AAA()
' do lots of stuff for task #1
' do lots of stuff for task #2
' do lots of stuff for task #3
End Sub

use structured code like

Sub AAA()
CallToOtherProcForTask1
CallToOtherProcForTask2
CallToOtherProcForTask3
End Sub

Sub CallToOtherProcForTask1
' code for task 1
End Sub

Sub CallToOtherProcForTask2
' code for task 2
End Sub

Sub CallToOtherProcForTask3
' code for task 3
End Sub



--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"David" wrote in message
...
Hi Group,

I am getting a message, "Procedure too large", there is a limit on the
amount of code that be be executed? This means I have to eliminate some of
the code?

Thanks,
David


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Procedure too large Rick Rothstein \(MVP - VB\)[_1308_] Excel Programming 0 February 20th 08 07:13 PM
procedure too large DB74 Excel Programming 7 September 11th 07 07:42 PM
Procedure Too Large Mike H. Excel Programming 4 September 7th 07 04:10 PM
Procedure too large Tommi[_2_] Excel Programming 3 November 25th 03 08:04 PM
procedure too large Ad van Zutphen Excel Programming 6 August 9th 03 02:21 AM


All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"