ListCount behaving not as expected.

R

Rob Hofkens

Hello everyone :)

In a form I read out the ListCount from a listbox after I set the rowsource
of the listbox.
To my surprise it counts always one more item then there are items in the
listbox except when there are no items it reads zero.

So when I see no items in the listbox the counter gives 0 and when I see for
example 8 items, I get 9 as a result from ListCount.

There must be something I don't know yet.....but what?

Anyone knows?

Thanks in advance !

Rob.
 
M

Marshall Barton

Rob said:
Hello everyone :)

In a form I read out the ListCount from a listbox after I set the rowsource
of the listbox.
To my surprise it counts always one more item then there are items in the
listbox except when there are no items it reads zero.

So when I see no items in the listbox the counter gives 0 and when I see for
example 8 items, I get 9 as a result from ListCount.

There must be something I don't know yet.....but what?


That's normal when you have the ColumnHeads property
set to Yes.
 
R

Rob Hofkens

Thank you very much :)

I know it had to be something like this but I couldn't find it in the VB
help library.

Rob.
 
Top