Deselect All in List Box

  • Thread starter Thread starter Pamela
  • Start date Start date
P

Pamela

I have a multi-select List Box on my form. Is there a way for the user to
Deselect All if they make a mistake and click on an Item in the box? I just
made the mistake myself in trial and while I can change the Item(s) selected,
I'm not being able to deselect all. Thanks so much!

Pamela
 
Here's one that clears a listbox on one of my forms:

Dim varItem As Variant

For Each varItem In Me.lstElevation.ItemsSelected
Me.lstElevation.Selected(varItem) = 0
Next varItem
Me.lstElevation.Requery
 
Thanks, Guys! I was getting ready to test it out when I found that if I
simply hold down Ctrl as I click even the last item in the box that it will,
indeed, deselect all. When I tried it before, I was just single clicking.

Thanks!
 
Back
Top