ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit for ListBox columns? (https://www.excelbanter.com/excel-programming/427719-limit-listbox-columns.html)

Ed Sowell

Limit for ListBox columns?
 
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


JLGWhiz[_2_]

Limit for ListBox columns?
 
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).



"Ed Sowell" wrote in message
...
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




Keith74

Limit for ListBox columns?
 
yes, an unbound listbox is limited to 10 columns


Ed Sowell

Limit for ListBox columns?
 
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

"JLGWhiz" wrote in message
...
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).



"Ed Sowell" wrote in message
...
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





[email protected]

Limit for ListBox columns?
 
On Wednesday, April 29, 2009 at 7:59:56 AM UTC-7, Ed Sowell wrote:
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


I have a question for unbound data source there is a limit for 10 columns so is there any way to make access data base as a bound column or increase the column as being a unbound data source plz rpl
thanks in advance



All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com