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

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

قام بنشر

عند 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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

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

Important Information