K
Ken Snell \(MVP\)
Cancel = True
The above statement simply cancels the BeforeUpdate event, thereby
preventing the control from losing focus or from the choice causing an
update to the listbox's value. It will not prevent you from selecting
another item in the listbox, although that item might cause the "Cancel" to
occur, and still keep you locked in the listbox.
Tell us what you're trying to accomplish with your form and listbox. Then we
may be able to suggest other ways to accomplish that purpose.
The above statement simply cancels the BeforeUpdate event, thereby
preventing the control from losing focus or from the choice causing an
update to the listbox's value. It will not prevent you from selecting
another item in the listbox, although that item might cause the "Cancel" to
occur, and still keep you locked in the listbox.
Tell us what you're trying to accomplish with your form and listbox. Then we
may be able to suggest other ways to accomplish that purpose.