DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim k As Range, adr As String, X As Long, sh As Worksheet
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
If TextBox1.Text = "" Then Exit Sub
Set sh = Sheets("KAYIT")
If OptionButton1.Value = True Then
j = 2
Else
j = 3
End If
For i = 1 To 3
X = 0
Set k = sh.Range(sh.Cells(3, j), sh.Cells(Columns.Count, j)).Find(TextBox1.Text, , xlValues, xlWhole)
If Not k Is Nothing Then
adr = k.Address
Do
Controls("ListBox" & i).AddItem
Controls("ListBox" & i).List(X, 0) = Format(sh.Cells(k.Row, j - 1).Value, "dd.mm.hh:mm:ss")
Controls("ListBox" & i).List(X, 1) = sh.Cells(k.Row, j).Value
X = X + 1
Set k = sh.Range(sh.Cells(3, j), sh.Cells(Columns.Count, j)).FindNext(k)
Loop While Not k Is Nothing And k.Address <> adr
End If
j = j + 4
Next
End Sub
Private Sub CommandButton1_Click()
Dim k As Range, adr As String, X As Long, sh As Worksheet
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
If TextBox1.Text = "" Then Exit Sub
Set sh = Sheets("KAYIT")
If OptionButton1.Value = True Then
j = 2
ekle = 2
Else
j = 3
ekle = 0
End If
For i = 1 To 3
X = 0
Set k = sh.Range(sh.Cells(3, j), sh.Cells(Columns.Count, j)).Find(TextBox1.Text, , xlValues, xlWhole)
If Not k Is Nothing Then
adr = k.Address
Do
Controls("ListBox" & i).AddItem
Controls("ListBox" & i).List(X, 0) = Format(sh.Cells(k.Row, j - 1).Value, "dd.mm.yyyy hh:mm")
Controls("ListBox" & i).List(X, 1) = sh.Cells(k.Row, j - 1 + ekle).Value
X = X + 1
Set k = sh.Range(sh.Cells(3, j), sh.Cells(Columns.Count, j)).FindNext(k)
Loop While Not k Is Nothing And k.Address <> adr
End If
j = j + 4
Next
End Sub