• DİKKAT

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

Listboxtan textboxa veri aktarma ve duzeltme hatasi

Private Sub liste_59(ByRef olcut_ad As String)
Dim sat
ListView1.ListItems.Clear


Sheets("hatakayit").Select
sat = Cells(Rows.Count, "A").End(xlUp).Row

TextBox22.Text = ""

If sat < 2 Then Exit Sub
Dim i As Long, tur, kod, ad As String
Set sr = Sheets("hatakayit")
ListView1.ListItems.Clear
With ListView1
For i = 2 To sat
If TextBox23.Value = "" Then
tur = sr.Cells(i, "E").Value
Else
tur = TextBox23.Value
End If
If TextBox21.Value = "" Then
kod = sr.Cells(i, "F").Value
Else
kod = TextBox21.Value
End If

tur = UCase(Replace(Replace(tur, "&#253;", "I"), "i", "&#221;"))
kod = UCase(Replace(Replace(kod, "&#253;", "I"), "i", "&#221;"))
If UCase(Replace(Replace(sr.Cells(i, "E").Value, "&#253;", "I"), "i", "&#221;")) _
Like "*" & tur & "*" _
And UCase(Replace(Replace(sr.Cells(i, "F").Value, "&#253;", "I"), "i", "&#221;")) _
Like "*" & kod & "*" Then
'.ListItems.Add , , sr.Cells(i, "A")
x = x + 1
.ListItems.Add , , Cells(i, "A").Value
.ListItems(x).SubItems(1) = Cells(i, "B").Value
.ListItems(x).SubItems(2) = Cells(i, "C").Value
.ListItems(x).SubItems(3) = Cells(i, "D").Value
.ListItems(x).SubItems(4) = Cells(i, "E").Value
.ListItems(x).SubItems(5) = Cells(i, "F").Value
.ListItems(x).SubItems(6) = Cells(i, "G").Value
.ListItems(x).SubItems(7) = Cells(i, "H").Value
.ListItems(x).SubItems(8) = Cells(i, "I").Value
.ListItems(x).SubItems(9) = Cells(i, "J").Value
End If


Next i
End With
TextBox22.Text = deg
TextBox22.Text = Format(ListView1.ListItems.Count, "#,##0")
ListView1.SelectedItem = Nothing
Set sr = Nothing

End Sub

bu sekilde tamamdir.gerek kalmadi...
 
Geri
Üst