Next mi ? end if mi ? yada başka bi kod

Katılım
18 Mart 2012
Mesajlar
19
Excel Vers. ve Dili
türkçe 2010
Merhaba bu kodun çalışıyor fakat bir kere düzgün çalışması için sonuna nasıl bir kod gerekiyor Next denedim bir kere çalıştı end if hiç çalışmadı.


ListBox1.MultiSelect = fmMultiSelectMulti
ListBox3.MultiSelect = fmMultiSelectMulti
For a = 0 To ListBox4.ListCount - 1
aa = ListBox4.List(a, 0)
For b = 0 To ListBox3.ListCount - 1
bb = ListBox3.List(b, 0)
For c = 0 To ListBox1.ListCount - 1
cc = ListBox1.List(c, 1)
If aa = bb And aa = cc Then
ListBox1.Selected(c) = True
ListBox3.Selected(b) = True
On Error Resume Next
If ListBox3.Selected(b) = True Then ListBox3.RemoveItem (b)
End If
Next
Next
Next
On Error Resume Next
For e = ListBox1.ListCount To 0 Step -1
If ListBox1.Selected(e) = True Then ListBox1.RemoveItem (e)
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,254
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Listbox1'e verilerin additem metodu ile alıması lazımdır.:cool:
Kod:
For e = ListBox1.ListCount [B][COLOR="Red"]- 1[/COLOR][/B] To 0 Step -1
If ListBox1.Selected(e) = True Then ListBox1.RemoveItem (e)
Next
 
Üst