Anyone have a good routine to capture the contents of a list box and dump it to a text file ?

EG: I need to capture the actual displayed data of a listbox, not just selected items, but all items.