- Katılım
- 21 Ekim 2020
- Mesajlar
- 24
- Excel Vers. ve Dili
-
microsoft office professional plus 2016 t
Türkçe
Sevgili üstadlar kolay gelsin
Excelde hazırlamış olduğum bir çalışma kitabında kayıtlar sayfasında b sütünunda arama yapıp bulduğum veriler listboxta gösterilsin ve bu verileri sayfa5 e kopyalasın
Private Sub ComboBox1_Change()
Dim say, i As Long, s As Byte
Sheets("Kayıtlar").Activate
ListBox1.Clear
say = WorksheetFunction.CountA(Sheets("Kayıtlar").Range("B:B"))
s = 0
For i = 1 To say
If Range("B" & i) = ComboBox1.Value Then
ListBox1.AddItem
ListBox1.ColumnCount = 7
ListBox1.List(s, 0) = Sheets("Kayıtlar").Range("A" & i)
ListBox1.List(s, 1) = Sheets("Kayıtlar").Range("B" & i)
ListBox1.List(s, 2) = Sheets("Kayıtlar").Range("C" & i)
ListBox1.List(s, 3) = Sheets("Kayıtlar").Range("D" & i)
ListBox1.List(s, 4) = Sheets("Kayıtlar").Range("E" & i)
ListBox1.List(s, 5) = Sheets("Kayıtlar").Range("F" & i)
ListBox1.List(s, 6) = Sheets("Kayıtlar").Range("G" & i)
s = s + 1
End If
Next i
Label1.Caption = ListBox1.ListCount & " Records!"
End Sub
Excelde hazırlamış olduğum bir çalışma kitabında kayıtlar sayfasında b sütünunda arama yapıp bulduğum veriler listboxta gösterilsin ve bu verileri sayfa5 e kopyalasın
Private Sub ComboBox1_Change()
Dim say, i As Long, s As Byte
Sheets("Kayıtlar").Activate
ListBox1.Clear
say = WorksheetFunction.CountA(Sheets("Kayıtlar").Range("B:B"))
s = 0
For i = 1 To say
If Range("B" & i) = ComboBox1.Value Then
ListBox1.AddItem
ListBox1.ColumnCount = 7
ListBox1.List(s, 0) = Sheets("Kayıtlar").Range("A" & i)
ListBox1.List(s, 1) = Sheets("Kayıtlar").Range("B" & i)
ListBox1.List(s, 2) = Sheets("Kayıtlar").Range("C" & i)
ListBox1.List(s, 3) = Sheets("Kayıtlar").Range("D" & i)
ListBox1.List(s, 4) = Sheets("Kayıtlar").Range("E" & i)
ListBox1.List(s, 5) = Sheets("Kayıtlar").Range("F" & i)
ListBox1.List(s, 6) = Sheets("Kayıtlar").Range("G" & i)
s = s + 1
End If
Next i
Label1.Caption = ListBox1.ListCount & " Records!"
End Sub