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

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

قام بنشر

انا بحاول اجيب اخر رقم  لسند القبض وا ازود +1 والكود مابيشتغل 

مشكلتى مش عارف اكتب max  مع داله index , match

Me.TextBox10 = Application.Index(Sheets("1").Range("g5:h65536"), Application.Match(Application.WorksheetFunction.Max((ComboBox2), Sheets("1").Range("g5:g65636"), 0), 2))
 

ارجوكم لا تبخلو عليا باهتمامكم 

وجزاكم الله خير 

قام بنشر

المشكلة اعتقد غي عبارة 

((Max((ComboBox2

لان محتويات اي ComboBox هي عبارة عن نص و ليس رقم لذلك اقترج استبدال العبارة بـــــ

Me.TextBox10 = Application.Index(Sheets("1").Range("g5:h65536"), _
Application.Match(Application.WorksheetFunction.Max((ComboBox2.Value) * 1, Sheets("1").Range("g5:g65636"), 0), 2))

 

 

قام بنشر

السلام عليكم

أعتقد أن هناك خطأ في الأقواس:

Me.TextBox10 = Application.Index(Sheets("1").Range("g5:h65536"), _
Application.Match(Application.WorksheetFunction.Max(ComboBox2.Value) * 1, Sheets("1").Range("g5:g65636"), 0), 2)

ملاحظة: لست أدري إن كان ممكنا تحديد MAX (أكبر قيمة) لـ ComboBox (كمبوبوكس)!!!

بن علية حاجي

قام بنشر

 

استاذ بن علية حاجي جزاك الله خيرا على المساعدة ولكن اظهر لى رساله خطاء 

14-05-39 04-33-12 م.png

قام بنشر

جرب هذا الكود

استبدل الرقم 1 باسم الشيت

Private Sub Combobox2_change()
Dim x As Long
Dim t
Dim m
 
x = (ComboBox2.Value) * 1
t = Application.Match(x, Sheets("1").Range("g5:g65636"), 0)
m = Application.Index(Sheets("1").Range("g5:g65636"), t)
 Me.Textbox10.Value = m
End Sub

 

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