...ListBox1.List(satir, 2) = rs.Fields("Birim")
ListBox1.List(satir, 3) = rs.Fields("B-Fiyat")
satir = satir + 1
End If
rs.MoveNext
Loop
End If
Set rs = Nothing: Set con = Nothing
Label3.Caption = "Listelenen Kayıt Sayısı : " & ListBox1.ListCount
End Sub
...= Sheets("Koleksiyon")
sonsat = s1.[A65536].End(3).Row
s1.Range("A:A").Clear
s1.Range("H:H").Clear
x = 1
For i = 0 To UserForm1.ListBox1.ListCount - 1
If UserForm1.ListBox1.Selected(i) = True Then
s1.Cells(x, "A") = UserForm1.ListBox1.List(i)
'MsgBox s1.Cells(x, "H")
x = x +...
Merhaba...
Private Sub CommandButton1_Click()
Dim i
With CreateObject("Scripting.Dictionary")
If ListBox2.ListCount > 0 Then
For Each i In ListBox2.List
.Item(i) = Null
Next i
End If
If ListBox1.ListCount > 0 Then...
...Ancak daha önce seçip ve aktarılmış bir verinin tekrardan aktarılmaması için nasıl bir kod oluşturulmalıdır. Listboxlar tek sütundan oluşmakta.
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
ListBox2.AddItem ListBox1.List(i, 0)
End If
Next i
Dener misiniz?
Private Sub CommandButton1_Click()
For x = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(x) =True Then
say = say + 1
End If
Next
MsgBox "ListBox'ta " & say & " satır seçili.", vbInformation, "BİLGİ"
End Sub
Şu şekilde dener misiniz?
dim i as integer
For i = 0 To ListBox1.ListCount - 1
Application.Workbooks.Open Environ("UserProfile") & "\Desktop\STAJYER_ÖĞRENCİ_PUANTAJLARI\" & ListBox4.list(i) 'Listbox'ta nasıl göründüğünü bilmiyorum. "Dosyaİsmi.xlsx" şeklinde uzantısı ile görünmüyorsa...
Sayın DoğanD ilgilendiğiniz için teşekkür ederim. Benim kodlarım aşağıda. (Döngünün içinde çalışacak kodlar) Listboxtaki verilerim STAJYER_ÖĞRENCİ_PUANTAJLARI adlı klasörde hepsi kapalı dosya. Döngü ile ilk veri seçili hale gelecek ve Listbox'ın hangi isim seçili ise o dosyayı açacak ve diğer...
...aşağıdaki gibi ayarlayabilirsiniz. Önemli nokta, Listbox'ın ilk iteminin indexi sıfırdır. Dolayısıyla döngüyü sıfırdan başlatmalı ve ListCount verisinin bir aşağısında bitirmelisiniz. ListBox1.List(i) koduyla da sıradaki veriyi kullanabilirsiniz.
For i = 0 To ListBox1.ListCount - 1...
...yeniden arama yaparak yine doğru olarak çalışır.
Private Sub TextBox1_Change()
If Len(TextBox1) < 3 Then Exit Sub
verisayisi = ComboBox1.ListCount - 1
uzunluk = Len(TextBox1)
Select Case IsNumeric(TextBox1)
Case False: sutno = 0
Case True: sutno = 1
End Select
For a = 0 To verisayisi
If...
...KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
On Local Error Resume Next
If KeyCode = vbKeyReturn Then
For Z = 0 To ListBox1.ListCount
DoEvents
If ListBox1.Selected(Z) Then
For i = 12 To 41
If Sayfa3.Cells(i, 1).Value = ListBox1.List(Z, 0) Then
MsgBox "Aşağıdaki ürün Daha Önce...
Eğer arada boş kayıtlar olacaksa bu kodu deneyin.
Olmayacaksa DoğanD üstadın söylediği gibi ekstra koda ihtiyacınız yok.
toplam = 0
For i = 0 To EVRAKARAMA.ListCount - 1
If EVRAKARAMA.List(i, 8) <> "" Then toplam = toplam + 1
Next i
Label90 = toplam
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.