Tarekchahine قام بنشر فبراير 16, 2022 مشاركة قام بنشر فبراير 16, 2022 السلام عليكم ورحمه الله استاذتنا الكرام ارجو المساعده في تعديل علي كود الترحيل من اليوزرفورم عند اختيار نوع الفاتوره ترحل الي شيت المطلوبها ( المبيعات او المشتريات او مرتجع ) AAAAA.rar رابط هذا التعليق شارك More sharing options...
أفضل إجابة lionheart قام بنشر فبراير 17, 2022 أفضل إجابة مشاركة قام بنشر فبراير 17, 2022 Private Sub CommandButton1_Click() Dim ws As Worksheet, lastRow As Long, rRow As Long, last As Integer, LS1 As Integer, LAS2 As Integer If Evaluate("ISREF('" & ComboBox6.Value & "'!A1)") Then Set ws = ThisWorkbook.Worksheets(ComboBox6.Value) Else MsgBox "Target Worksheet Not Found", vbExclamation: Exit Sub End If With ws .Activate rRow = .Cells(1, 1).CurrentRegion.Rows.Count + 1 last = .Range("A10000").End(xlUp).Row + 1 For i = 0 To ListBox1.ListCount - 1 .Cells(last, "F").Value = Me.ListBox1.List(i, 0) .Cells(last, "G").Value = Me.ListBox1.List(i, 1) .Cells(last, "H").Value = Me.ListBox1.List(i, 2) .Cells(last, "I").Value = Me.ListBox1.List(i, 3) last = last + 1 Next i LS1 = .Range("A10000").End(xlUp).Row + 1 ls2 = .Range("F10000").End(xlUp).Row For S = LS1 To ls2 .Cells(LS1, "A").Value = Me.TextBox1.Value .Cells(LS1, "b").Value = Me.ComboBox5.Value .Cells(LS1, "C").Value = Me.TextBox2.Value .Cells(LS1, "D").Value = Me.ComboBox4.Value Sheet2.Cells(LS1, "E").Value = Me.ComboBox5.Value LS1 = LS1 + 1 Next S End With MsgBox "Data Added Successfully", 64 End Sub 3 رابط هذا التعليق شارك More sharing options...
Tarekchahine قام بنشر فبراير 17, 2022 الكاتب مشاركة قام بنشر فبراير 17, 2022 lionheart🤩 ماشاء الله عليك استاذ والله انت مبدع و جعله الله في ميزان حسناتك ربنا يحميك 2 رابط هذا التعليق شارك More sharing options...
الردود الموصى بها