Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

procedure too large

Status
Not open for further replies.

EKelly

Programmer
Jul 3, 2002
49
IE
Hi guys,
Just a quick question. I have a VB procedure that gives the error "procedure too large". I can't break it down any futher. Does anyone know what the max amount of lines of code in a procedure is? Do comments count in this figure?

Thanks
Erin
 
Forgive me for asking a stupid question - but why can't you split the procedure down?

Anyway the MSDN says about this error
The maximum size of the internal code for an individual procedure in Visual Basic version 3.0 is 64K bytes. Microsoft Visual Basic version 4.0 for Windows uses Microsoft Visual Basic for Applications, which generates more generic internal code than does Microsoft Visual Basic version 3.0. This generic code allows for compatibility with a wider range of processors. This makes the internal code larger, so it can cause very large procedures to exceed the 64K limit and fail to compile.

But I can't find anything in there for VB 5 or 6.

However I do know that there is a fixed limit on the number of line_ concatenations (I believe 14) and there are some other things like that which may be catching you out.

M

'Here I am, brain the size of a planet and they ask me to take you down to the bridge. Call that "job satisfaction"? Cos I don't.'
 
Actually I just found a faq that might be able to help you.
Check out the answer to "KNOWN BUGS AND LIMITATIONS Q1: I get a "Procedure too large" compile error" from here:
M



'Here I am, brain the size of a planet and they ask me to take you down to the bridge. Call that "job satisfaction"? Cos I don't.'
 
A quick keyword search for 'procedure limit' in this forum would have found the same answer (in, eg, thread222-857489)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top