...ayarlarını nasıl sıfırlayabilirim.
2 Açılır pencereyi 20 tane yapacak kod ve özelliklerden nasıl yapabilirim. (Aşağıdaki kodu sayfa2 ye yazdım (modüle değil) bir işe yaramadı. )
Private Sub ComboBox1_Initialize()
ComboBox1.ListRows = ComboBox1.ListCount
Sayfa2.ComboBox1.ListRows = 15
End Sub
...a = Me.ListBox1.ListIndex + 1
Dim t As String
Dim i As Integer
t = arama.Text
ListBox1.ListIndex = -1
If arama.Text = "" Then Exit Sub
For i = a To ListBox1.ListCount - 1
If UCase(ListBox1.List(i)) Like UCase(t & "*") Then
ListBox1.ListIndex = i
Exit Sub
End If
Next i
End Sub
.
...Integer)
If KeyCode = 13 Then
Dim t As String
Dim i As Integer
t = TextBox22.Text
ListBox1.ListIndex = -1
If TextBox22.Text = "" Then Exit Sub
For i = 0 To ListBox1.ListCount - 1
If UCase(ListBox1.List(i)) Like UCase(t & "*") Then
ListBox1.ListIndex = i
Exit Sub
End If
Next i
End If
End...
...Dim i As Integer
t = TextBox22.Text
ListBox1.ListIndex = -1
If TextBox22.Text = "" Then Exit Sub
For i = 0 To ListBox1.ListCount - 1
If UCase(ListBox1.List(i)) Like UCase(t & "*") Then
ListBox1.ListIndex = i
Exit Sub
End If
Next i...
...> 0 _
And Me.TextBox1 <> "" Then
Me.ListBox1.AddItem
For cln = 1 To rng.Columns.Count
ad = Sheet1.Cells(rc, cln)
Me.ListBox1(ListBox1.ListCount - 1, cln - 1) = ad
Next cln
End If
Next rc
Me.ListBox1.Height = Me.ListBox1.ListCount * 20
End Sub
Aşağıdaki kodu sadece bir kere ekleyin.
Sub Secim(Lbox As Control, Deger As Control)
Dim Bak As Long
For Bak = 0 To Lbox.ListCount - 1
Lbox.Selected(Bak) = Deger.Value
Next
End Sub
Aşağıdaki kodu da her CheckBox için ayrı ayrı ekleyin.
Aşağıdaki kod CheckBox1'in seçimine...
...Kaydet butonunun kodları .
Private Sub CommandButton1_Click()
Dim Bak As Integer
Worksheets.Add
Range("A1:A" & ListBox1.ListCount).Value = ListBox1.List
Range("A1:A" & ListBox1.ListCount).NumberFormat = "dd/mm/yy hh:mm;@"
For Bak = 1 To ListBox1.ListCount...
Aşağıdaki kodları deneyin:
Private Sub CommandButton3_Click()
Set s1 = Sheets("Sayfa1")
Set s2 = Sheets("Sayfa2")
For i = ListBox1.ListCount - 1 To 0 Step -1
If ListBox1.Selected(i) = True Then
yeni = s2.Cells(Rows.Count, "B").End(3).Row + 1
For j = 0 To 6...
...Sheets("In").Range("B14:D18").ClearContents
Application.ScreenUpdating = False
sat = 14
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Sheets("In").Cells(sat, "B") = ListBox1.List(i, 0)
Sheets("In").Cells(sat...
Yusuf Bey, kod ile değil sayfa ile alakalı sorunmuş. Yazdığınız kodda problem yok. Farklı bir uygulamada sorunsuz çalışıyor. İlgi, emek ve zaman ayırdığınız için çok teşekkür ederim.
...diğer 7 sütunun verisi bir alt B satırdan itibaren geliyor. Bir kayma oluyor.
Private Sub CommandButton1_Click()
For sat = 1 To ListBox1.ListCount - 1
For sut = 1 To 8
yeni = Sheets("Veri").Cells(Rows.Count, "A").End(3).Row + 1
Sheets("Veri").Cells(yeni, sut) = ListBox1.List(sat, sut - 1)...
...getiriyor. Kendimce düzelteyim dedim olmadı. Son çalışır hali aşağıda. Bu kodları nasıl istediğim hale getirebilirim?
Private Sub CommandButton1_Click()
For sat = 1 To ListBox1.ListCount - 1
For sut = 1 To 8
Sheets("Veri").Cells(sat + 1, sut) = ListBox1.List(sat, sut - 1)
Next: Next
End Sub
Korhan Bey çok teşekkür ederim. Kısmen çözüldü. Daha önce pek çok örnek kod denemiştim.
.AddItem
.List(0, 0) = "Barkod"
.List(0, 1) = "Ürün Kodu"
.List(0, 2) = "Ürün Adı"
.List(0, 3) = "Adet"
kod satırları ile listboxa başlık yazdırınca toplam alınacak sütun değerini metin olarak görüyor, o...
Örnek kodu kendi dosyanıza uyarlarsınız.
Private Sub CommandButton1_Click()
Dim X As Long, Toplam As Double
For X = 0 To Me.ListBox1.ListCount - 1
Toplam = Toplam + Me.ListBox1.List(X, 3)
Next
TextBox1 = Format(Toplam, "#,##0.00")
End Sub
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.