• DİKKAT

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

Listeleme ComboBox seçimli

  • Konbuyu başlatan Konbuyu başlatan ocamsul
  • Başlangıç tarihi Başlangıç tarihi
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Katılım
19 Ocak 2005
Mesajlar
940
Excel Vers. ve Dili
İŞ : Microsoft Office Excel 2003
EV : Microsoft Office Excel 2003
UserForm belirlenmiş alanı ListBox da listeliyor.
Kod:
Private Sub UserForm_Initialize()
On Error Resume Next
With Application
Me.Top = .Top
Me.Left = .Left
Me.Height = .Height
Me.Width = .Width
End With
ListBox1.ColumnCount = 29
ListBox1.List = Range("A3:AC" & Cells(65536, "A").End(xlUp).Row).Value
End Sub

Aşağıdaki kod da ise ComboBox seçimine göre listelemeyi nasıl yapabiliriz?
UserForm un Initialize durumunada dikkat ederek ComboBox un seçimi doğrultusunda nasıl liste alırız?
Kod:
 Private Sub ComboBox1_Change()
Sheets("Sayfa1").Select
ListBox1.Clear
son = Cells(65536, 3).End(xlUp).Row
For i = 1 To son
If LCase(Cells(i, 2).Text) = LCase(ComboBox1.Text) Then
Cells(i, 1).Select
c = c + 1
For Y = 3 To 11
ListBox1.AddItem 'malum 10 sütundan fazla listelemiyor!!!
ListBox1.List(c - 1, Y - 3) = Cells(i, Y).Value
Next
End If
Next
End Sub
 

Ekli dosyalar

Dosyanız ektedir.:cool:
Kod:
Private Sub ComboBox1_Change()
Dim myarr(), c As Long, i As Long
Sheets("Sayfa1").Select
ListBox1.Clear
son = Cells(65536, 3).End(xlUp).Row
ReDim myarr(1 To 11, 1 To son)
For i = 1 To son
If LCase(Replace(Replace(Cells(i, 2).Text, "I", "ı"), "İ", "i")) _
= LCase(Replace(Replace(ComboBox1.Text, "I", "ı"), "İ", "i")) Then
Cells(i, 1).Select
c = c + 1
For Y = 1 To 11
ListBox1.AddItem
myarr(Y, c) = Cells(i, Y).Value
Next
End If
Next
If c > 0 Then
    ReDim Preserve myarr(1 To 11, 1 To c)
    ListBox1.Column = myarr
End If
    
End Sub
 

Ekli dosyalar

SN: Evren Gizler; Üstadım çok teşekkür ederim. Tamda bunu anlatmak istemiştim. :):):)
 
Son düzenleme:
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Geri
Üst