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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb limits 4

Status
Not open for further replies.

rtshort

IS-IT--Management
Joined
Feb 28, 2001
Messages
878
Location
US
What are the Max lines of code and Max controls on a single form? Rob
Just my $.02.
 
I do not know about max lines of code..but i think 255 is the max control on a single form..Not very sure though.. Murali Bala
 
I do not think there is a limit to the number of lines of code - you're limited by storage space (and ungodly compile times if you have 50MB of code to complile!) Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
"Would you like me to save your game of Minesweeper first?"

Like my post? Let me know it was helpful!
 
Hi Rob
This is straight from msdn

Total Number of Controls
The maximum number of controls allowed on a single form depends on the type of controls used and available system resources. However, there is a fixed limit of 254 control names per form. A control array counts only once toward this limit because all the controls in the array share a single control name.

The limit on control array indexes is 0 to 32,767 on all versions.

If you layer controls on top of each other, such as using several frame controls within other frames, Visual Basic will generally accept no more than 25 levels of nested controls.


The amount of code that can be loaded into a form, class, or standard module is limited to 65,534 lines. A single line of code can consist of up to 1023 bytes. Up to 256 blank spaces can precede the actual text on a single line, and no more than twenty-five line-continuation characters ( _) can be included in a single logical line.

Procedures, Types, and Variables
There is no limit on the number of procedures per module. Each procedure can contain up to 64K of code. If a procedure or module exceeds this limit, Visual Basic generates a compile-time error. If you encounter this error, you can avoid it by breaking extremely large procedures into several smaller procedures, or by moving module-level declarations into another module.

Visual Basic uses tables to store the names of identifiers (variables, procedures, constants, and so on) in your code. Each table is limited to 64K.

Jon
 
Foiled again! Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
"Would you like me to save your game of Minesweeper first?"

Like my post? Let me know it was helpful!
 
hi Jon4747

Thanks for the excellent piece of Information..great work Murali Bala
 
Hey Murali, if you liked Jon's post, don't forget to
give him a star!

:-Q
 
Thanks guys, and John for going the xtra mile. It's worth a Star I think. I see it was to someone else too.

Regards
Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top