listbox remove item

Katılım
23 Mart 2013
Mesajlar
1
Excel Vers. ve Dili
Excel 2003/2007 ve 2010 Ingilizce
Merhaba,
Benim uzun zamandir access-excel i birlikte kullandigim bir proje uzerinde calisiyorum.Son asamasina ulastim ama karsima kucuk bir problem cikti. Excel dosyasinin icerisinde bulunan bir userform icerisinde bulunan listbox a, dort tane combobox vasitasiyla advance filter yaapmak istiyorum.Amacim combobox change event ile listbox tan remove item yapmak.Ornegin eger combobox1.value, listbox1 liste itemlarindan 3 column daki deger ile esit degilse, listbox item i remove yapmak istiyorum.Size bir code ornegi sunuyorum.Acaba combobox change event ile listbox1 den item cikartmak mumkun mu?
Kod:
Private Sub UserForm_Initialize()
Dim cel As Range

ComboBox1.AddItem "DLR"
ComboBox1.AddItem "DI"
ComboBox1.AddItem "SUP"
With ListBox1
For Each cel In Sheets("Sheet1").Range("A1:A100")
If cel <> "" Then
.AddItem cel.Value
.List(.ListCount - 1, 1) = cel.Offset(0, 1)
.List(.ListCount - 1, 2) = cel.Offset(0, 2)
End If
Next cel
End With

End Sub
 
Üst