If a user presses OK when a listbox is presented my program fails because nothing was selected and the program is expecting a value.
Is there a way to require the user to make a selection?
There are several ways to do this. The easiest might be to check for selection when the user attempts to exit the control via a close event or the OK button press in a dialog callback. You might be best served by looking at a few examples of dialog-callback-subroutines in the Consolidated WIL Help file, Windows Interface Language Reference > Things to Know > Dialogs > Dialog Functions > Dialog.