Cengizhantr06
Altın Üye
- Katılım
- 16 Mayıs 2020
- Mesajlar
- 327
- Excel Vers. ve Dili
- Office 365 Türkçe
- Altın Üyelik Bitiş Tarihi
- 18-05-2025
merhaba bu kodlardaki listview yerine listboxa çevirebilirmiyiz acaba
Sub gir_tarihara()
Dim sr As Worksheet
Dim X As Long
Dim i As Long
Set sr = Sheets("girisler")
ListView3.ListItems.Clear
ListView3.FullRowSelect = True
With ListView3
For i = 2 To sr.Cells(65536, "A").End(xlUp).Row
On Error Resume Next
If VBA.CLng(VBA.CDate(sr.Cells(i, "B").Value)) >= VBA.CLng(VBA.CDate(TextBox45.Value)) And VBA.CLng(VBA.CDate(sr.Cells(i, "B").Value)) <= VBA.CLng(VBA.CDate(TextBox46.Value)) And (sr.Cells(i, "C").Value = ComboBox13.Value) Then
.ListItems.Add , , sr.Cells(i, "A")
X = X + 1
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "B")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "C")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "D")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "E")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "F")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "G")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "H")
End If
Next i
End With
Set sr = Nothing
End Sub
Sub gir_tarihara()
Dim sr As Worksheet
Dim X As Long
Dim i As Long
Set sr = Sheets("girisler")
ListView3.ListItems.Clear
ListView3.FullRowSelect = True
With ListView3
For i = 2 To sr.Cells(65536, "A").End(xlUp).Row
On Error Resume Next
If VBA.CLng(VBA.CDate(sr.Cells(i, "B").Value)) >= VBA.CLng(VBA.CDate(TextBox45.Value)) And VBA.CLng(VBA.CDate(sr.Cells(i, "B").Value)) <= VBA.CLng(VBA.CDate(TextBox46.Value)) And (sr.Cells(i, "C").Value = ComboBox13.Value) Then
.ListItems.Add , , sr.Cells(i, "A")
X = X + 1
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "B")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "C")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "D")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "E")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "F")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "G")
.ListItems(X).ListSubItems.Add , , sr.Cells(i, "H")
End If
Next i
End With
Set sr = Nothing
End Sub