Code:
if !$did(<dialog_name>,[ID]).lines
<dialog_name> is not required if the line is part of an ON DIALOG event.
[ID] is the dialog ID for the list box