Limit for ListBox columns?

E

Ed Sowell

I am trying to display a table with 22 columns and about 100 rows in a
ListBox in a User form. When it runs I get the message:

Error 380: Could not set the List property. Invalid property value.

This happens while loading the first row. If I just load about 10 columns it
will load all the rows.

Is there a limit on ListBox columns?

TIA

Ed
 
J

JLGWhiz

This is out of VBA help file for ListBox properties, column count.

Setting ColumnCount to 0 displays zero columns, and setting it to -1
displays all the available columns. For an unbound data source, there is a
10-column limit (0 to 9).
 
E

Ed Sowell

Thanks. I had been adding the items one at a time across the rows with the
List Add method and no column was bound. I have now switched to using
RowSource, loading the entire table from a worksheet into the ListBox. That
works, and has the added benefit of getting me a header row. Also have bound
the listbox control to one of the columns.

I had searced Help, but searced on Columns or something and got nothing
helpful.

I have another question, but I'll put it in another thread.

Ed
 

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