Removing highlight from list boxes (1 Viewer)

Kiwi-Wombat

Registered User.
Local time
Yesterday, 18:36
Joined
Aug 2, 2004
Messages
56
I have a form with two list boxes showing data from two different tables.

The user double clicks on an item in the first list box which puts the value into a separate text box. They then select one or more items from the second list box which combine the answers in the text box. The resulting answer is subsequently placed into a memo field on another form. I hope all that makes sense.

My problem is when you select from either list box, the items selected are highlighted. This is OK but I want the highlight to go once the item has been put into the text box, leaving a clean list box again. I tried BackColor but that doesn't work.

Any ideas?
 

ghudson

Registered User.
Local time
Yesterday, 21:36
Joined
Jun 8, 2002
Messages
6,195
This will allow you to deselect everthing in a list box named "MyListBox"
Code:
Dim i As Integer
Dim intListCount As Integer
intListCount = MyListBox.ListCount - 1
For i = 0 To intListCount
MyListBox.Selected(i) = False
Next
 

Kiwi-Wombat

Registered User.
Local time
Yesterday, 18:36
Joined
Aug 2, 2004
Messages
56
Works perfectly

Thanks for your help
 

Users who are viewing this thread

Top Bottom