Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Procedure Too Large -- But Only In Debug Mode

Posted on 2006-07-05
10
Medium Priority
?
502 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
Independent Software Vendors: 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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