هال88 قام بنشر نوفمبر 28, 2018 قام بنشر نوفمبر 28, 2018 اخواني الكرام احتاج بعد الترحيل ان يقوم بحذف اصل البيانات من بعد مرحلة الترحيل ليس حذف كل البيانات وانما حذف البيانات استنادا للبيانات التي تم عرضها قبل المستخدم الرجاء حذف البيانات يرتكز على كومبو بوكس 2 لأنه يمثل رقم وظيفي مع العلم كومبو بوكس 1 يمثل وسيلة الترحيل حسب الاتجاه تم ارفاق الكود للمساعدة شكرا لكم Private Sub CommandButton1_Click() If Me.ComboBox2.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.TextBox2.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.ComboBox1.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.TextBox4.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.TextBox5.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.TextBox11.Value = "" Then MsgBox "Please complete the data! .. íÑÌì ÊÚÈÆÉ ÇáÈíÇäÇÊ ßÇãáÉ" Exit Sub End If If Me.ComboBox1.Value = "North" Then Sheet1.Activate Dim lastrow As Integer lastrow = [a1000].End(xlUp).Row + 1 Cells(lastrow, 1).Value = Me.ComboBox2.Value Cells(lastrow, 2).Value = Me.TextBox13.Value Cells(lastrow, 3).Value = Me.TextBox6.Value Cells(lastrow, 4).Value = Me.ComboBox1.Value Cells(lastrow, 5).Value = Me.TextBox11.Value Cells(lastrow, 6).Value = Me.TextBox12.Value Cells(lastrow, 7).Value = Me.TextBox9.Value Cells(lastrow, 8).Value = Me.TextBox10.Value Cells(lastrow, 9).Value = Me.TextBox7.Value Cells(lastrow, 10).Value = Me.TextBox8.Value Cells(lastrow, 11).Value = Me.TextBox2.Value Cells(lastrow, 12).Value = Me.TextBox14.Value Cells(lastrow, 13).Value = Me.TextBox5.Value Cells(lastrow, 14).Value = Me.TextBox4.Value MsgBox "Data saved! .. Êã ÍÝÙ ÇáÈíÇäÇÊ" ComboBox2.Value = "" TextBox13.Value = "" TextBox6.Value = "" ComboBox1.Value = "" TextBox11.Value = "" TextBox12.Value = "" TextBox9.Value = "" TextBox10.Value = "" TextBox7.Value = "" TextBox8.Value = "" TextBox2.Value = "" TextBox14.Value = "" TextBox5.Value = "" TextBox4.Value = "" ComboBox2.SetFocus If Me.ComboBox1.Value = "South" Then Sheet2.Activate Dim lastrow As Integer lastrow = [a1000].End(xlUp).Row + 1 Cells(lastrow, 1).Value = Me.ComboBox2.Value Cells(lastrow, 2).Value = Me.TextBox13.Value Cells(lastrow, 3).Value = Me.TextBox6.Value Cells(lastrow, 4).Value = Me.ComboBox1.Value Cells(lastrow, 5).Value = Me.TextBox11.Value Cells(lastrow, 6).Value = Me.TextBox12.Value Cells(lastrow, 7).Value = Me.TextBox9.Value Cells(lastrow, 8).Value = Me.TextBox10.Value Cells(lastrow, 9).Value = Me.TextBox7.Value Cells(lastrow, 10).Value = Me.TextBox8.Value Cells(lastrow, 11).Value = Me.TextBox2.Value Cells(lastrow, 12).Value = Me.TextBox14.Value Cells(lastrow, 13).Value = Me.TextBox5.Value Cells(lastrow, 14).Value = Me.TextBox4.Value MsgBox "Data saved! .. Êã ÍÝÙ ÇáÈíÇäÇÊ" ComboBox2.Value = "" TextBox13.Value = "" TextBox6.Value = "" ComboBox1.Value = "" TextBox11.Value = "" TextBox12.Value = "" TextBox9.Value = "" TextBox10.Value = "" TextBox7.Value = "" TextBox8.Value = "" TextBox2.Value = "" TextBox14.Value = "" TextBox5.Value = "" TextBox4.Value = "" ComboBox2.SetFocus END IF END SUB
هال88 قام بنشر نوفمبر 28, 2018 الكاتب قام بنشر نوفمبر 28, 2018 شكرا اخي أحمد يوسف تم ارفاق الملف TR- Test v1.xlsm
الردود الموصى بها