Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox

Status
Not open for further replies.

wirehead

MIS
Nov 27, 2001
9
0
0
US
Is there a way to unselect a listbox item?
Example:
I am in listbox B and select a row, then I move to a command button or to listbox A. Is there a way to unselect the row in listbox B (nothing selected).

thanks for the help.
Rad
 
Me!lstSource.Selected(intCurrentRow) = False
or for a number of items:

Private Sub cmdDeselect_Click()
Dim intCurrentRow As Integer

For intCurrentRow = 0 To lstSource.ListCount - 1
If Me!lstSource.Selected(intCurrentRow) = True Then
Me!lstSource.Selected(intCurrentRow) = False
End If
Next intCurrentRow

End Sub

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top