• DİKKAT

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

Listboxda bir sonraki yada bir önceki satır

  • Konbuyu başlatan Konbuyu başlatan feryat
  • Başlangıç tarihi Başlangıç tarihi
Katılım
18 Mart 2005
Mesajlar
63
Excel Vers. ve Dili
office2007 türkçe
bir buton yardımıyla listboxta bir önceki yada bir sonraki satıra nasıl geçerim.
 
Bir sonraki satır için;

Kod:
If ListBox1.ListIndex < ListBox1.ListCount - 1 Then ListBox1.ListIndex = ListBox1.ListIndex + 1

Bir önceki satır için;

Kod:
If ListBox1.ListIndex > 0 Then ListBox1.ListIndex = ListBox1.ListIndex - 1
 
Olmadı

Alakanıza teşekkür ederim.

Private Sub CommandButton2_Click()
If UserForm3.ListBox1.ListIndex < ListBox1.ListCount - 1 Then
UserForm3.ListBox1.ListIndex = UserForm3.ListBox1.ListIndex + 1
End If
End Sub

kodu bu biçimiyle yazdım ama iş görmedi.

Userform4 te userform3.listboxtaki veriler görüntüleniyor. Bu verileri userform3 e dönmeden form4 üzerindeki bir butonla aşağı yukarı gezmek istiyorum ama olmuyor.

dosyaya linkten ulaşabilirsiniz.



http://rapidshare.com/files/23147827/Goezlem_Defteri.rar.html
 
Aşağıdaki kodları deneyin.

Kod:
Private Sub CommandButton2_Click()
If UserForm3.ListBox1.ListIndex < UserForm3.ListBox1.ListCount - 1 Then
UserForm3.ListBox1.ListIndex = UserForm3.ListBox1.ListIndex + 1
End If
UserForm_Initialize
End Sub
 
Private Sub CommandButton3_Click()
If UserForm3.ListBox1.ListIndex < UserForm3.ListBox1.ListCount - 1 Then
UserForm3.ListBox1.ListIndex = UserForm3.ListBox1.ListIndex - 1
End If
UserForm_Initialize
End Sub
 
Teşekkür.

Kod çalışıyor. Çok teşekkür ederim.
 
Geri
Üst