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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear Listbox Selection 2

Status
Not open for further replies.

KingAndy

Programmer
Aug 14, 2002
5
0
0
GB
Hello - Hope someone can help.

I have a Listbox on a form with multiple select set to Simple.

How can I clear/unselect the selected lines of the listbox when a button is clicked? Ive tried setting the .ItemsSelected to null or nothing, but Access wont let you do this.

Can anyone help

Thanks
Andy
 
You can do this in the button click event

Dim intCount As Integer
For intCount = 0 To List0.ListCount - 1
List0.Selected(intCount) = False
Next intCount
There are two ways to write error-free programs; only the third one works.
 
Thanks

Thats worked a treat! - and what a speedy response!

Thanks again

Andy
 
Andy,

Where's the star for GHolden?!?!

Thanks GHolden, helped me too... :eek:)

Will give you a star now :)

Aubs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top