Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Runtime error 380 - Could not set the list property. Invalid property value.

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Runtime error 380 - Could not set the list property. Invalid property value.

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



--

Regards,

Tom Ogilvy



wrote in message
ups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Runtime error 380 - Could not set the list property. Invalid property value.

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Runtime error 380 - Could not set the list property. Invalid property value.

That is what it means.

None that are shipped with Excel.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not set the ControlSource property. Invalid property value error Ömer Ayzan Excel Programming 2 October 31st 06 09:15 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
Runtime Error 381 Couldn't set list property, invalid array index Newbillian Excel Programming 2 June 17th 04 11:25 AM
Runtime Error 381 Couldn't set list property, invalid array index Newbillian Excel Programming 0 June 16th 04 11:28 PM


All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"