Solved

Procedure Too Large -- But Only In Debug Mode

Posted on 2006-07-05
10
493 Views
Last Modified: 2008-02-01
I have some legacy code that compiles fine. However, when I run it in debug mode, this one function stops with "procedure too large". Is there something easy that I can set/fix? Changing this code to reduce code might be a pain.
0
Comment
Question by:GivenRandy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17043639
Hmm, never seen that one before. Any chance you can break the procedure down into smaller sub routines ?
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 17043666
Yeah, but I'd rather not (has to go through a lot of testing, etc.). Was hoping there was something "strange", like some setting. If not, will have to modify the code. :(
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17043678
Just out of curiosity, how long is your procedure ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 65

Expert Comment

by:rockiroads
ID: 17043768
Why dont u break it up into smaller procedures?
Just a work around suggestion


sub Proc1
   'do some stuff

    'Call another procedure to continue
    Proc2
end sub

sub Proc2
   'do some stuff

    'Call another procedure to continue
    Proc3
end sub

etc

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17043793
checking the net, I found one site that says

if this is a treeview programme, then you can list a long segment under a separate procedure and call this procedure in the main programme.
i have done this and it works smoothly.



0
 
LVL 9

Author Comment

by:GivenRandy
ID: 17044311
>Just out of curiosity, how long is your procedure ?

4,626 lines
122,146 characters (not counting whitespace)
201,639 characters (counting whitespace)
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 17044351
wow, thats one big procedure. Apparently the max size for a procedure is 64K:

    http://www.aivosto.com/vbwatch/help/faq.htm
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17044470
I think that means you have no choice but to break the procedure up into three parts...
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 17044763
Yep, I was afraid of that. It's going to be a pain.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17045548
Will it be that bad?

The workaround I gave, which is what u are look like your doing now anyway
If u make those variables in that procedure globals to that mod
it may work, no?

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 65
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 65
Added a column screws up code 5 75
VBA Replace Function - What am I missing? 3 50
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question