Solved

Procedure Too Large -- But Only In Debug Mode

Posted on 2006-07-05
10
494 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

726 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