View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pswanie pswanie is offline
external usenet poster
 
Posts: 247
Default getting error with empty listbox

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

i rechecked it now. if i have data in c1 and c2 i dont get the error
thanx

Phillip