اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

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

قام بنشر

بعد تجربة المرفق

بعد إذنك

تعديل بسيط استاذنا الفاضل في الكود

 

ليصبح كالتالي

Private Sub TextBox1_Change()
Sheets("Sheet1").Range("B3") = Val(TextBox1)
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub
Private Sub TextBox2_Change()
Sheets("Sheet1").Range("B4") = Val(TextBox2)
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub


Private Sub UserForm_Activate()
TextBox1 = Sheets("Sheet1").Range("B3")
TextBox2 = Sheets("Sheet1").Range("B4")
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub
  • Like 1
قام بنشر

 

بعد تجربة المرفق

بعد إذنك

تعديل بسيط استاذنا الفاضل في الكود

 

ليصبح كالتالي

Private Sub TextBox1_Change()
Sheets("Sheet1").Range("B3") = Val(TextBox1)
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub
Private Sub TextBox2_Change()
Sheets("Sheet1").Range("B4") = Val(TextBox2)
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub


Private Sub UserForm_Activate()
TextBox1 = Sheets("Sheet1").Range("B3")
TextBox2 = Sheets("Sheet1").Range("B4")
TextBox3 = Val(TextBox1) + Val(TextBox2)
End Sub

نورت االموضوع وبارك الله فيك

قام بنشر

تسلم استاذ علي المصري الف شكر

لكن بعد اذنكم لي سؤال

اذا كان الكود التالي ينفذ عملية الجمع مع تحريك الماوس

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

TextBox95.Value = Val(TextBox50) + Val(TextBox73) + Val(TextBox84)
TextBox94.Value = Val(TextBox51) + Val(TextBox72) + Val(TextBox83)
TextBox93.Value = Val(TextBox52) + Val(TextBox71) + Val(TextBox82)
TextBox92.Value = Val(TextBox53) + Val(TextBox70) + Val(TextBox81)
TextBox91.Value = Val(TextBox54) + Val(TextBox69) + Val(TextBox80)
TextBox90.Value = Val(TextBox55) + Val(TextBox68) + Val(TextBox79)
TextBox89.Value = Val(TextBox56) + Val(TextBox67) + Val(TextBox78)
TextBox88.Value = Val(TextBox57) + Val(TextBox66) + Val(TextBox77)
TextBox87.Value = Val(TextBox58) + Val(TextBox65) + Val(TextBox76)
TextBox85.Value = Val(TextBox60) + Val(TextBox63) + Val(TextBox97)
'----
TextBox86.Value = Val(TextBox59) + Val(TextBox64) + Val(TextBox75)
TextBox96.Value = Val(TextBox61) + Val(TextBox62) + Val(TextBox74)
'---------

TextBox59.Value = Val(TextBox50) + Val(TextBox51) + Val(TextBox52) + Val(TextBox53) + _
Val(TextBox54) + Val(TextBox55) + Val(TextBox56) + Val(TextBox57) + Val(TextBox58)
TextBox61.Value = Val(TextBox60) + Val(TextBox59)
'------
TextBox64.Value = Val(TextBox73) + Val(TextBox72) + Val(TextBox71) + Val(TextBox70) + _
Val(TextBox69) + Val(TextBox68) + Val(TextBox67) + Val(TextBox66) + Val(TextBox65)
TextBox62.Value = Val(TextBox64) + Val(TextBox63)
'-----------
TextBox75.Value = Val(TextBox84) + Val(TextBox83) + Val(TextBox82) + Val(TextBox81) + _
Val(TextBox80) + Val(TextBox79) + Val(TextBox78) + Val(TextBox77) + Val(TextBox76)
TextBox74.Value = Val(TextBox97) + Val(TextBox75)

End Sub

الايوجد كود اخر غير تحريك الموس لانة لا يظهر النتائج مباشرة

وكذلك غير وضع المعادلات في Private Sub TextBox80_Change() مثلا لانها تحتاج معادلات كثيرة

ولكم جزيل الشكر علي التعاون

جزاكم اللة خيرا

قام بنشر (معدل)

تسلم استاذ علي المصري الف شكر

لكن بعد اذنكم لي سؤال

اذا كان الكود التالي ينفذ عملية الجمع مع تحريك الماوس

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

TextBox95.Value = Val(TextBox50) + Val(TextBox73) + Val(TextBox84)

TextBox94.Value = Val(TextBox51) + Val(TextBox72) + Val(TextBox83)

TextBox93.Value = Val(TextBox52) + Val(TextBox71) + Val(TextBox82)

TextBox92.Value = Val(TextBox53) + Val(TextBox70) + Val(TextBox81)

TextBox91.Value = Val(TextBox54) + Val(TextBox69) + Val(TextBox80)

TextBox90.Value = Val(TextBox55) + Val(TextBox68) + Val(TextBox79)

TextBox89.Value = Val(TextBox56) + Val(TextBox67) + Val(TextBox78)

TextBox88.Value = Val(TextBox57) + Val(TextBox66) + Val(TextBox77)

TextBox87.Value = Val(TextBox58) + Val(TextBox65) + Val(TextBox76)

TextBox85.Value = Val(TextBox60) + Val(TextBox63) + Val(TextBox97)

'----

TextBox86.Value = Val(TextBox59) + Val(TextBox64) + Val(TextBox75)

TextBox96.Value = Val(TextBox61) + Val(TextBox62) + Val(TextBox74)

'---------

TextBox59.Value = Val(TextBox50) + Val(TextBox51) + Val(TextBox52) + Val(TextBox53) + _

Val(TextBox54) + Val(TextBox55) + Val(TextBox56) + Val(TextBox57) + Val(TextBox58)

TextBox61.Value = Val(TextBox60) + Val(TextBox59)

'------

TextBox64.Value = Val(TextBox73) + Val(TextBox72) + Val(TextBox71) + Val(TextBox70) + _

Val(TextBox69) + Val(TextBox68) + Val(TextBox67) + Val(TextBox66) + Val(TextBox65)

TextBox62.Value = Val(TextBox64) + Val(TextBox63)

'-----------

TextBox75.Value = Val(TextBox84) + Val(TextBox83) + Val(TextBox82) + Val(TextBox81) + _

Val(TextBox80) + Val(TextBox79) + Val(TextBox78) + Val(TextBox77) + Val(TextBox76)

TextBox74.Value = Val(TextBox97) + Val(TextBox75)

End Sub

الايوجد كود اخر غير تحريك الموس لانة لا يظهر النتائج مباشرة

وكذلك غير وضع المعادلات في Private Sub TextBox80_Change() مثلا لانها تحتاج معادلات كثيرة

ولكم جزيل الشكر علي التعاون

جزاكم اللة خيرا

اذا كنت تقصد انها تأخذ حيز كبير داخل كود التيكست بوكس فيمكنك وضعها في ميديول واستدعاء المديول من داخل التيكست بوكس لو ارفقت الملف الجديد ساريك كيف

تم تعديل بواسطه وائل احمد المصري
  • Like 1

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