|
-
Apr 7th, 2006, 03:04 PM
#1
Thread Starter
Lively Member
VB6 app gives run-time error 6 overflow
My VB6 app gives run-time error '6' overflow. It is simply passing results of several file searches to a listbox. It only crashes when hundreds of lines have been written to the listbox, performing fine if there are are not that many. Is there a limit to how many lines a listbox can handle?
How can I trap this error and see what is causing it?
-
Apr 7th, 2006, 03:20 PM
#2
Fanatic Member
Re: VB6 app gives run-time error 6 overflow
you may have a variable set as a byte, then that variable if linked to the lines in the listbox would be overflowed at 255.
Check it out and change it to a long or integer or something, and no listboxes can go VERY FAR.
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 7th, 2006, 03:20 PM
#3
Hyperactive Member
Re: VB6 app gives run-time error 6 overflow
There is a limit of 32,767 items. Exceeding that limit will generate the error you mentioned.
-
Apr 7th, 2006, 03:52 PM
#4
Thread Starter
Lively Member
Re: VB6 app gives run-time error 6 overflow
Will check out the variables.
What constitutes an 'item' in a listbox?
-
Apr 7th, 2006, 03:55 PM
#5
Hyperactive Member
Re: VB6 app gives run-time error 6 overflow
 Originally Posted by imperialdata
What constitutes an 'item' in a listbox?
Umm, an entry that was added using the AddItem method.
-
Apr 7th, 2006, 05:07 PM
#6
Thread Starter
Lively Member
Re: VB6 app gives run-time error 6 overflow
Daft question I suppose but was surprised to learn you could have 32,767 single characters or 32,767 large strings
-
Apr 7th, 2006, 05:14 PM
#7
Re: VB6 app gives run-time error 6 overflow
 Originally Posted by imperialdata
My VB6 app gives run-time error '6' overflow. It is simply passing results of several file searches to a listbox. It only crashes when hundreds of lines have been written to the listbox, performing fine if there are are not that many. Is there a limit to how many lines a listbox can handle?
How can I trap this error and see what is causing it?
Use the listview control instead
-
Apr 7th, 2006, 05:38 PM
#8
Thread Starter
Lively Member
Re: VB6 app gives run-time error 6 overflow
Can you explain why it's better Remix?
-
Apr 7th, 2006, 06:52 PM
#9
Re: VB6 app gives run-time error 6 overflow
 Originally Posted by imperialdata
Can you explain why it's better Remix?
It's a more robust control in that you can have more than 32,767 items and, if you need them you can have functional multiple columns and column headers, etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|