Filtering On Listbox And Copying Filtered Data
You can filter in for each column with textbox and button. By
selecting from the filtered data, you can copy it to other sheet (SelectedData sheet).
You can multi-select (feature of "Select All") to copy.
Code of "Select All" on listbox with checkbox :
Private Sub CheckBox1_Click()
Dim r As Long
If CheckBox1.Value = True Then
ListBox2.MultiSelect = fmMultiSelectMulti
For r = 0 To ListBox2.ListCount - 1
ListBox2.Selected(r) = True
Next r
Else
For r = 0 To ListBox2.ListCount - 1
ListBox2.Selected(r) = False
Next r
End If
End Sub
Dim r As Long
If CheckBox1.Value = True Then
ListBox2.MultiSelect = fmMultiSelectMulti
For r = 0 To ListBox2.ListCount - 1
ListBox2.Selected(r) = True
Next r
Else
For r = 0 To ListBox2.ListCount - 1
ListBox2.Selected(r) = False
Next r
End If
End Sub
Very useful Thanks!!
ReplyDeletei need ur help
ReplyDeletei am trying the same filter list box scripts in my working file but failed to do so .. if u can help me it will b gr8 support as i am stuck from msny days
ReplyDeleteMerhaba, textbox'ın içerisine yazılan yazının sonuç textin içinde olma durumunuda değerlendirme komutu nedir.
ReplyDeleteÖrn/
Search = "Osman"
Result = Osman , Osmanoğlu, Osmaniye
Teşekkür ederim
I am unable to downlod
ReplyDelete