0
Good afternoon, you guys
It’s a very stupid question, because I’m starting in vba programming and I’m not being able to correct this error. I’d appreciate it if someone could help me I would like to fill a listbox with three columns in which the column title is : Criterion, Distribution and Variation The first column shall be filled with E1, E2, E3, ... E10 (10 lines) The second column shall be filled in with the text "uniform" for all rows The third column shall be filled with the value "10" for all rows
However, I am only able to assign the value of the title of the first column. When I try to add the title of the second one the following error is displayed: Could not set List property. Invalid property array index. vba
The Columncount property was set to 3
the code I was trying was as follows:
With Me.lstbxCritEst
.AddItem
.List(0, 0) = "Critério"
.List(1, 0) = "Distribuição" ' o erro ocorre nessa linha
.List(2, 0) = "Variação"
End With
Thank you very much, Andrea!!! That was the problem. I reversed the contents of the row with the column! That’s why that error message was occurring. Your code helped a lot. Thank you
– Roberta Barbosa