excel - Could not set the List property -


i have looked issue , tried follow of solutions happens reason it's not working me.

so have dropdown menu (gateway) , text box (duedate) , once select , fill blank spaces want populate listbox1 being 1st column gateway , 2nd column duedate.

this have, pops window saying: "run-time error '381': not set list property. invalid property array index."

private sub commandbutton2_click()     'listbox1.additem (gateway.value)     listbox1.list(listcount - 1, 0) = gateway.value     listbox1.list(listcount - 1, 1) = duedate.value end sub 

i have set listbox1 boundcolumn , columncount 2 in design editor.

thanks in advance!

edit: managed fix it. based on first comment thread have used following.

with listbox1     listcount = .listcount     .additem gateway.value     .list(listcount, 1) = duedate.value end 

i needed time figure out myself (^.^):

private sub commandbutton2_click()      listbox1         listcount = .listcount         .additem gateway.value, listcount -1         .list(listcount - 1, 0) = duedate.value     end  end sub 

tell me if worked.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -