- Katılım
- 19 Mart 2008
- Mesajlar
- 2,154
- Excel Vers. ve Dili
- Office 2007 Enterprise
Türkçe
Merhaba Arkadaşlar. Döngü ile Listboxta veri seçildikten sonra,listbox üzerinde ve sayfa üzerinde döngü ile satır seçme konusunda takıldım. Nerede hata yapıyorum.
Kod:
Private Sub CommandButton1_Click()
For i = 2 To Cells(Rows.Count, "B").End(3).Row
say = 0
say = say + i - 1
Satır = say & ListBox1.ListIndex + 2
Range("B2:B8").Interior.ColorIndex = xlNone
Range("B" & Satır & ":B" & Satır).Interior.ColorIndex = 6
Label1.Caption = Cells(say + 1, "B")
Application.Wait Now + TimeValue("00:00:2")
Set ara = Cells.Find(What:=i, After:=ActiveCell, LookIn:=xlFormulas)
If Not ara Is Nothing Then
ilk = ara.Address
ara.Select
End If
Next
MsgBox "Tamam"
End Sub
Private Sub ListBox1_Click()
TextBox1.Value = ListBox1.List(ListBox1.ListIndex, 0)
End Sub
Private Sub UserForm_Initialize()
ListBox1.RowSource = "Sayfa1!B2:B" & [Sayfa1!B20].End(xlUp).Row
End Sub
