• DİKKAT

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

Arama Kutusu İçin yardım

Katılım
23 Nisan 2010
Mesajlar
42
Excel Vers. ve Dili
2007
arkadaşlar arama kutusuna yazdığımda stuna göre arıyor yalnız listboxa aktarma yaptığı zaman benim istediğim stundan aktarma yapabilirmi yani 2013 arattığımda filmin adı çıksın 2013 yazısı değil

Private Sub TextBox16_Change()
sat = Val(ComboBox1.ListIndex + 1)
Dim i As Integer
Dim j As Integer
Dim s As String
ListBox1.Clear
ListBox1.ColumnCount = 2
ListBox1.ColumnWidths = "100;0;0" 'lisbox'taki sütunların genişliği
sat1 = 0
For i = 2 To Worksheets("LISTE").[a65536].End(3).Row
s = LCase(TextBox16.Text)
If Worksheets("LISTE").Cells(i, 1).Value > 0 Then
If TextBox16.Text <> "" Then
deg = 0
For j = 1 To Len(Sheets("LISTE").Cells(i, sat).Value)
If s = LCase(Mid(Sheets("LISTE").Cells(i, sat).Value, j, Len(TextBox16.Value))) Then
deg = 1
End If
Next
If deg = 1 Then
ListBox1.AddItem
ListBox1.List(sat1, 0) = Sheets("LISTE").Cells(i, sat).Value
ListBox1.List(sat1, 1) = i
sat1 = sat1 + 1
End If
Else
ListBox1.AddItem
ListBox1.List(sat1, 0) = Sheets("LISTE").Cells(i, sat).Value
ListBox1.List(sat1, 1) = i
sat1 = sat1 + 1
End If
End If
Next

For ts = 1 To 15
If Sheets("LISTE").Cells(1, ts) = ComboBox1 Then
TextBox20 = WorksheetFunction.CountIf(Sheets("LISTE").Columns(ts), "*" & TextBox16 & "*")
End If
Next
End Sub
 

Ekli dosyalar

  • Film.xls
    Film.xls
    121.5 KB · Görüntüleme: 16
Kod:
ListBox1.List(sat1, 0) = Sheets("LISTE").Cells(i, [COLOR="Red"]sat[/COLOR]).Value


Kodun yukarıdaki bölümlerini aşağıdaki ile değiştirin.

Kod:
ListBox1.List(sat1, 0) = Sheets("LISTE").Cells(i, [COLOR="red"]"B"[/COLOR]).Value

Kırmızı yerleri siz A,B,C,D harflerinden birini yazarsanız istediğiniz sütunlardaki verileri alırsınız.
 
Geri
Üst