empty listbox giving error

P

pswanie

i got a userform with a list box. the listbox gather data from sheet6 colum
c. it works perfect if i got data in c1 to c8.
the userform.show property and the listbox etc works perfect if i got data
in the cells
i never needed to have all the cells in colum c empty. now i saw that if i
do empty colum c i am gettin a runtime error on the list box

===============================================================
run-time error '381':

could not set the list property. invalid property array index.

===============================================================

im calling the userform in workbook open event. if a cell on sheet2 is
empty then the userform prompt the user to select names from the list box.
the error points to this line if i select debug...
===============================================================

If IsEmpty(Sheets("sheet2").Range("d42")) Then UserForm1.Show
===============================================================

let me know if i need to provide the code behind the userform

thanx

Phillip
 

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