Thread: List Box Forms
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Nimish Nimish is offline
external usenet poster
 
Posts: 29
Default List Box Forms

I havea form that I have created with two list boxes. The macros
launches a filter. How do I create a property in the list box that
would allow a user to "deselect" the list box. Right now, once the
user clicks in the box, a name is highlighted and the only option is
the select another name. You can't click on a name again and deselect
it.

My code is:

Private Sub CommandButton1_Click()
vEmpSups = frmSupervisors.lstEmpSups.Value
vRoutesups = frmSupervisors.LstRouteSups.Value

Sheets("DispatchSheet").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=vEmpSups
Selection.AutoFilter Field:=2, Criteria1:=vRoutesups

End Sub