stumbling block!

in my program, the user clicks on a tlistbox that may (or may not) be populated with items. the program then runs various tasks based on the selected item in the listbox.
if the listbox is blank, or if the user clicks outside the items (i.e. in white space), i get an out of bounds error with the kill/corrupt options.
the error seems to be inevitable, is there any way of changing the text in the errormessage to say something more friendly like "please only click on items" or even to just silently "ignore" the fact it is out of bounds altogether and do nothing at all if the user clicks on a non-item???
i've tried changing it to dblclick but that doesn't force the user to highlight and click on an item.
im at a complete loss as to this one.