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

تفعيل زر موافق بشرط اختيار عنصر من الكمبوبوكس


kmaal

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

السلام عليكم ورحمة الله وبركاته

أسأل الله أن يبلغنا ويبلغكم رمضان في أتم الصحة والعافية

يرجى تكرمكم بمساعدتي بكود تفعيل زر موافق بشرط اختيار أي عنصر من عناصر الكمبوبوكس

اما إذا كانت العناصر كلها على القيمة 0 يعني (فارغ) فإن الزر يكون غير مفعل

نا جربت هذا الكود بس ما نفع معي :

If ComboBox1.ListIndex = 0 And ComboBox2.ListIndex = 0 And ComboBox3.ListIndex = 0 And ComboBox4.ListIndex = 0 And ComboBox5.ListIndex = 0 And ComboBox6.ListIndex = 0 And ComboBox7.ListIndex = 0 And ComboBox8.ListIndex = 0 Then

Me.CommandButton2.Enabled = False

وشكراً جزيلاً

وجزيتم خيراً

التوقيع1.rar

تم تعديل بواسطه kmaal
رابط هذا التعليق
شارك

و عليكم السلام و رحمة الله و بركاته

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

جرب هذا التعديل إن شاء الله يكون هو طلبك



If ComboBox1.ListIndex <> 0 OR ComboBox2.ListIndex <> 0 OR ComboBox3.ListIndex <> 0 OR ComboBox4.ListIndex <> 0 OR ComboBox5.ListIndex <> 0 OR ComboBox6.ListIndex <> 0 OR ComboBox7.ListIndex <> 0 OR ComboBox8.ListIndex <> 0 Then

Me.CommandButton2.Enabled = True

Else

Me.CommandButton2.Enabled = False

End If

أو يمكنك أستبدال ( OR ) ب ( AND ) و التبديل بين ( FALSE) و ( TRUE ) حسب المطلوب تأديته و جرب هذا أيضا


If ComboBox1.ListIndex = 0 And ComboBox2.ListIndex = 0 And ComboBox3.ListIndex = 0 And ComboBox4.ListIndex = 0 And ComboBox5.ListIndex = 0 And ComboBox6.ListIndex = 0 And ComboBox7.ListIndex = 0 And ComboBox8.ListIndex = 0 Then

Me.CommandButton2.Enabled = False

Else

Me.CommandButton2.Enabled = True

End If

تم تعديل بواسطه أبو ردينة
رابط هذا التعليق
شارك

وجدت الحل إضافة هذا السطر إلى كل صندوق :

CommandButton2.Enabled = (ComboBox1.ListIndex > 0 Or ComboBox2.ListIndex > 0 Or ComboBox3.ListIndex > 0 Or ComboBox4.ListIndex > 0 Or ComboBox5.ListIndex > 0 Or ComboBox6.ListIndex > 0 Or ComboBox7.ListIndex > 0 Or ComboBox8.ListIndex > 0)

شكراً جزيلاً

في أمان الله

رابط هذا التعليق
شارك

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