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

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

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

تحية طيبة

في الملف المرفق أريد الـcombobox أن يعرض القيم التي أكبر من صفر فقط وإذا كانت القيمة صفر ( أي لا يوجد قيم في القائمة سوى - صفر ) يتم إخفاء الـ combobox

وإذا تم إدخال قيم في القائمة يتم إظهار الـ combobox

comboboxView.rar

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

جرب هذا الكود في حدث الورقة


Private Sub Worksheet_Selectionchange(ByVal Target As Range)

LastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1

ComboBox1.Clear

For t = 1 To LastRow

If Cells(t, 1).Value > 0 And Cells(t, 1) <> "" Then

ComboBox1.AddItem Cells(t, 1).Value

End If

Next

End Sub

قام بنشر

بعد اذن أخى الحبيب / أبو حنين

ولإثراء الموضوع هذا كود آخر


Private Sub Worksheet_Selectionchange(ByVal Target As Range)

x = Application.WorksheetFunction.Sum(Range("List"))

ComboBox1.Clear

If x = 0 Then

    ComboBox1.Visible = False

Else

	 ComboBox1.Visible = True

	 For Each cl In Range("list")

	 If cl > 0 Then

	 ComboBox1.AddItem cl

	 End If

	 Next

End If

End Sub

comboboxView.rar

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