Runtime error 380 - Could not set the list property. Invalid property value.

V

viktorka.mail

Hello,
I'm getting this error message %subject% while trying to assign value
into the listbox in VBA Excel.
The error occurs when writting to column "10" either the "columncount"
property is set to 26.

the code is:

lb_report.ColumnCount = pocet_stlp + 1
If r = 1 Then condition = True
If condition = True Then
rwrite = rwrite + 1
lb_report.AddItem
For s = 1 To pocet_stlp
hodnota = ws.Cells(r, CInt(lb_colselected.List(s - 1,
1))).Value
lb_report.List(rwrite - 1, CInt(s)) = hodnota
Next s
End If


Thakns for advice
 
T

Tom Ogilvy

unbound controls are limited to 10 columns. from the help on ColumnCount
property:

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).
 
V

viktorka.mail

Does it mean, that there is no way how to add more then 10 columns
without binding it to worksheet?

Any other controls couldn't manage this?
 

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