اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

عند 12 عمود وعندي و 6 شيتات 

السؤال عندي قيمة احد الاعمدة الي هو combox1   متعدد الاختيار اذا اخترت من هذه القائمة ينقول البيانات المدخلة  عند الترحيل  مباشرة على الشيت نفسة 

الثاني عدم كتابة اي شي في الخانة   combox1  أو التعديل  من قبل المستخدم الاختيار فقط

وشكرا لكم على تعاونكم

Private Sub CommandButton1_Click()
If Me.ComboBox1.Value = "السلة الغذائية" Then
sheet2.Activate
Dim w As Integer
w = sh[a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If

If Me.ComboBox1.Value = "قرض الزواج" Then
Activate.sheet3

w = [a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If

If Me.ComboBox1.Value = "قرض الحاجة" Then
sheet4.Activate

w = [a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If

If Me.ComboBox1.Value = "تفريج كربة" Then
sheet5.Activate

w = [a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If

If Me.ComboBox1.Value = "الهبة غير المستردة" Then
sheet6.Activate
w = [a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If
If Me.ComboBox1.Value = "المتعثرين في السداد" Then
sheet7.Activate

w = [a10000].End(xlUp).Row + 1
Cells(w, 1).Value = Me.TextBox1.Value
Cells(w, 2).Value = Me.TextBox2.Value
Cells(w, 3).Value = Me.ComboBox1.Value
Cells(w, 4).Value = Me.ComboBox2.Value
Cells(w, 5).Value = Me.TextBox3.Value
Cells(w, 6).Value = Me.ComboBox3.Value
Cells(w, 7).Value = Me.TextBox4.Value
Cells(w, 8).Value = Me.TextBox5.Value
Cells(w, 9).Value = Me.TextBox6.Value
Cells(w, 10).Value = Me.TextBox7.Value
Cells(w, 11).Value = Me.ComboBox4.Value
Cells(w, 12).Value = Me.ComboBox5.Value
MsgBox "تم الترحيل بنجاح"
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox3.Value = ""
ComboBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox1.SetFocus
End If
End Sub

‏‏لقطة الشاشة (21).png

‏‏لقطة الشاشة (22).png

انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد

يجب ان تكون عضوا لدينا لتتمكن من التعليق

انشئ حساب جديد

سجل حسابك الجديد لدينا في الموقع بمنتهي السهوله .

سجل حساب جديد

تسجيل دخول

هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.

سجل دخولك الان
  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information