• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

ListView Kullanımı / with ile kullanım

  • Konbuyu başlatan Konbuyu başlatan walabi
  • Başlangıç tarihi Başlangıç tarihi

walabi

Altın Üye
Katılım
22 Eylül 2012
Mesajlar
1,080
Excel Vers. ve Dili
excel 2010

excel 2013
Merhaba, hayırlı günler,

Aşağıdaki kod satırları ile iki ayrı listboxa veri eklemekteyim. Tek satırlık verileri listboxlara ekliyorum. Bu kodların işlevini aynı şekilde yapacak listview kodları nasıl olmalı. iki listbox yerine birtane listview kullanmak amacındayım. Ancak listview in with ile nasıl kullanıldığını anlamadım.

Kod:
If TextBox5.Value <> "" And TextBox6.Value <> "" Then
      
        With ListBox1
            .AddItem ComboBox1
            .List(.ListCount - 1, 0) = ComboBox1.Value
            .List(.ListCount - 1, 1) = TextBox1.Value
            .List(.ListCount - 1, 2) = TextBox2.Value
            .List(.ListCount - 1, 3) = TextBox3.Value
            .List(.ListCount - 1, 4) = TextBox4.Value
            .List(.ListCount - 1, 5) = TextBox5.Value
            .List(.ListCount - 1, 6) = TextBox6.Value
            
        End With
End If

If TextBox5.Value <> "" And TextBox6.Value <> "" Then
      
        With ListBox2
            .AddItem TextBox1.Text
            .List(.ListCount - 1, 0) = TextBox7.Value
            .List(.ListCount - 1, 1) = TextBox8.Value
            .List(.ListCount - 1, 2) = TextBox9.Value
            .List(.ListCount - 1, 3) = TextBox10.Value
            .List(.ListCount - 1, 4) = TextBox11.Value
            .List(.ListCount - 1, 5) = TextBox12.Value
            .List(.ListCount - 1, 6) = TextBox13.Value
            .List(.ListCount - 1, 7) = TextBox14.Value
            .List(.ListCount - 1, 8) = TextBox15.Value
            
        End With
End If
 
Merhaba.
Konu ile ilgili forumda birçok yardımcı konu var.
Aşağıdaki linkten inceleyebilirsiniz.

ListView Örnekleri
 
Geri
Üst