By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,916 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,916 IT Pros & Developers. It's quick & easy.

Clearing multi-select list

P: n/a
Hi

How can I clear the selection from a multi-select list via code?

Thanks

Regards
Jul 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
See the ClearList() function at:
http://allenbrowne.com/func-12.html

Works for both normal and multi-select list box.

(There's also a function to select all.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:V9******************************@pipex.net...
>
How can I clear the selection from a multi-select list via code?

Jul 16 '06 #2

P: n/a
Hi John,

Try something like this out:

Private Sub Command9_Click()
Dim i As Integer
For i = 0 To List7.ListCount
List7.Selected(i) = False
Next
End Sub

This will loop through all the items in a listbox and just set everthing
to selected = false.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.