netvolxxx
Altın Üye
- Katılım
- 29 Ağustos 2023
- Mesajlar
- 175
- Excel Vers. ve Dili
- 2013 Türkçe
- Altın Üyelik Bitiş Tarihi
- 07-03-2025
merhaba şöyle bir çalışmam var data sayfasında verilerim var userform açıldığında textbox ara yaptırıp listbox a listeleniyor burda seçili olan buton ile aktar dediğimde cari sayfasına aktarmasını yapamadım bi türlü nasıl olcak.
yardımlarınızı bekliyorum....
listbox gelen satırdaki tüm bilgiyi satırı aktarcak cari sayfasına.
örnek dosyayı ekledim ekte....
Private Sub CommandButton1_Click()
Set s1 = Sayfa1
Son = s1.Cells(Rows.Count, "B").End(3).Row
If TextBox1.Value = "" Then
ListBox1.Clear
Exit Sub
End If
For i = 1 To Son
If LCase(s1.Cells(i, 2)) Like "*" & LCase(TextBox1.Value) & "*" Then
ListBox1.AddItem s1.Cells(i, 2)
End If
Next i
End Sub
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
On Error Resume Next
Set s1 = ThisWorkbook.Worksheets("data")
Set s2 = ThisWorkbook.Worksheets("cari")
s2.Range("a2:n2").ClearContents
For i = 2 To s1.Range("B65536").End(xlUp).Row
If s1.Cells(i, "B") = s2.Cells(1, "N") Then
sonsatir = s2.Range("a65536").End(xlUp).Row + 1
For k = 1 To 14
s2.Cells(sonsatir, N) = s1.Cells(i, O)
Next k
End If
Next i
Application.ScreenUpdating = True
MsgBox "İşlem TAMAM.", vbInformation
End Sub
yardımlarınızı bekliyorum....
listbox gelen satırdaki tüm bilgiyi satırı aktarcak cari sayfasına.
örnek dosyayı ekledim ekte....
Private Sub CommandButton1_Click()
Set s1 = Sayfa1
Son = s1.Cells(Rows.Count, "B").End(3).Row
If TextBox1.Value = "" Then
ListBox1.Clear
Exit Sub
End If
For i = 1 To Son
If LCase(s1.Cells(i, 2)) Like "*" & LCase(TextBox1.Value) & "*" Then
ListBox1.AddItem s1.Cells(i, 2)
End If
Next i
End Sub
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
On Error Resume Next
Set s1 = ThisWorkbook.Worksheets("data")
Set s2 = ThisWorkbook.Worksheets("cari")
s2.Range("a2:n2").ClearContents
For i = 2 To s1.Range("B65536").End(xlUp).Row
If s1.Cells(i, "B") = s2.Cells(1, "N") Then
sonsatir = s2.Range("a65536").End(xlUp).Row + 1
For k = 1 To 14
s2.Cells(sonsatir, N) = s1.Cells(i, O)
Next k
End If
Next i
Application.ScreenUpdating = True
MsgBox "İşlem TAMAM.", vbInformation
End Sub
Ekli dosyalar
-
22.8 KB Görüntüleme: 1