|
-
June 2nd, 1999, 01:38 PM
#1
listcount property
It appears as though the listcount property of a listbox is limited to an integer number. Is there a way to set the listcount property to return a longint value?
EFD
-
June 2nd, 1999, 11:13 PM
#2
Re: listcount property
Hi,
Do you just want : "the listcount property to return a longint value?", then you can use 'type cast' function Clng, like
clng(list1.listcount)
But, if you really have > 32767 no. of elements,
it is not possible to add that many, in the first place. i.e a code like
dim i as long
for i = 1 to 32768
List1.AddItem "item:" & format(i)
next i
gives run time error 5, "Invalid procedure call".
( A bug?!, shouldn't it give Err No 6: Overflow?!!) when i = 32768. This code runs fine if the outer limit is 32767.
Designers of VB must have thought, for sizes that big, it warrents a seperate handling!! You can maintain yourown list of strings and display only a portion of them!!
Ravi
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
|