Listboxa 11 sutun almada hata

ASMET67

Altın Üye
Katılım
8 Haziran 2007
Mesajlar
410
Excel Vers. ve Dili
Excel 2016
Altın Üyelik Bitiş Tarihi
30-11-2027
selamlar.
Listbox1 nesnesine 11 sutunlu excel sayfasından bu kodlarla veri almaya çalışıyorum. 9 sutun alıyor 10 ve 11 sutunlrda haya veriyor.
ListBox1.RowSource yönetimi işimi görmüyor Add ile 11 sutunu nasıl aldırabilirim.


Kod:
 With Me.ListBox1
                   Liste = ListBox1.ListCount
                    ListBox1.AddItem 
                    ListBox1.List(Liste, 0) = s1.Cells(satır, 1)
                    ListBox1.List(Liste, 1) = s1.Cells(satır, 2)
                    ListBox1.List(Liste, 3) = s1.Cells(satır, 3)
                    ListBox1.List(Liste, 4) = s1.Cells(satır, 4)
                    ListBox1.List(Liste, 5) = s1.Cells(satır, 5)
                    ListBox1.List(Liste, 6) = s1.Cells(satır, 6)
                    ListBox1.List(Liste, 7) = s1.Cells(satır, 7)
                    ListBox1.List(Liste, 8) = s1.Cells(satır, 8)
                    ListBox1.List(Liste, 9) = s1.Cells(satır, 9)
                   ' ListBox1.List(Liste, 10) = s1.Cells(satır, 10)
                    
                    
                    say = say + 1
                
         
                End With
 

veyselemre

Özel Üye
Katılım
9 Mart 2005
Mesajlar
3,653
Excel Vers. ve Dili
Pro Plus 2021
Verilerinizi diziye alıp, daha sonra listbox a yükleyin. Başka işlem yapmanız gerektiği zamanda listboxtan diziye alın, dizi üzerinde işlemlerinizi yapın, sonra tekrar listbox a diziyi yükleyin.
Kod:
a = [a1:q10].Value
With Me.ListBox1
    ListBox1.List = a
End With
 
Üst