السلام عليكم
اخواني مشكلتي هي اني اريد كود لفحص listbox1 ب listbox2 اي :
مثلا اذا وجد Item في listbox1 وايضا موجودة في listbox2 اقوم بأمر معين مثل طباعة item في Textbox1
مثال على كود :
كود :
If ListBox1.Items.Contains(ListBox2.Items.Item) Then
TextBox1.text= ListBox2.Items.Item
End If
وشكراااا
ولا اريد تحديد item معينة مثل :
إقتباس : If ListBox1.Items.Contains(ListBox2.Items.Item("123")) Then
TextBox1.text= ListBox2.Items.Item("123")
End If
هههه خلص تم حل المشكله :
إقتباس :For i = 0 To ListBox1.Items.Count - 1Next
If ListBox2.Items.Contains(ListBox1.Items.Item(i)) Then
MsgBox(ListBox1.Items.Item(i))
End If