Unselect an item from a listbox

wsyeager

Centurion
Joined
Apr 10, 2003
Messages
140
Location
Weston, FL
When data is retrieved from my database and placed in a listbox, the first item is always selected. However, I do not want that behavior. How do you programatically unselect items in a listbox?

I know how to do it using a webform listbox, but the windowsform listbox does not work the same way.
 
Try ListBox1.ClearSelected() in your Form Load event after the listbox has been populated. It will clear the selection bar from the listbox on startup.
 
Last edited:
Back
Top