kemal turan
Altın Üye
- Katılım
- 10 Haziran 2011
- Mesajlar
- 1,677
- Excel Vers. ve Dili
- Excel 2010 32 bit
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Private Sub ListBox1_Click()
Dim SYF As Worksheet, ARA As Range, STR As Variant
Set SYF = Sheets("Kayıtlar")
With ListBox1
Set ARA = SYF.Range("B:B").Find(.List(.ListIndex, 1) _
, , , xlPart)
End With
If Not ARA Is Nothing Then
STR = ARA.Address
Do
Sayfa1.Range("B3") = SYF.Cells(ARA.Row, "A")
Set ARA = SYF.Range("B:B").FindNext(ARA)
Loop While Not ARA Is Nothing And ARA.Address <> STR
End If
End Sub
Private Sub TextBox1_Change()
Dim SYF As Worksheet, ARA As Range, STR As Variant, ST As Long
If TextBox1 = "" Then
UserForm_Initialize
Else
Set SYF = Sheets("Kayıtlar")
Set ARA = SYF.Range("B:B").Find(TextBox1.Text, , , xlPart)
ListBox1.RowSource = ""
ST = 1
If Not ARA Is Nothing Then
STR = ARA.Address
Do
ListBox1.AddItem
ListBox1.List(0, 0) = SYF.Cells(1, 1)
ListBox1.List(0, 1) = SYF.Cells(1, 2)
ListBox1.AddItem
ListBox1.List(ST, 0) = SYF.Cells(ARA.Row, "A")
ListBox1.List(ST, 1) = SYF.Cells(ARA.Row, "B")
ST = ST + 1
Set ARA = SYF.Range("B:B").FindNext(ARA)
Loop While Not ARA Is Nothing And ARA.Address <> STR
End If
End If
End Sub
Private Sub UserForm_Initialize()
With ListBox1
.ColumnCount = 2
.ColumnWidths = "50;120"
.RowSource = "KAYITLAR!A1:B" & Sayfa2.[A65536].End(3).Row
End With
End Sub