ListBox: How to determine length of list in different columns

M

Myles

Suppose I have worksheet data covering A1:A50; B1:B85, C1:C100, D1:D5
and this is loaded into a listbox using the RowSource property, how
could I, -without reference to the worksheet-, return the number of
rows (seperately) in Columns 1,2,3 and 4. In this instance, the
solution will be 50 for Column1, 85 for Column2, 100 for Column3 and 5
for Column4.

Note that using ListBox1.ListCount property inappropriately produces
the Maximum row length of 100.

Thanks.
 
T

Tom Ogilvy

First, it would be silly not to use the range if that was the easiest answer
and certainly no reason not to.

Your choices with that limitation are pretty much to loop through each row
in your list and count.

Why do you say the Listcount result of 100 is inappropriate. You have 100
rows in the list, so that is the appropriate answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top