If ListBox1.Items.Count - 1 < (0) Then MsgBox("لايوجد عنصر يحمل رقم الاندكس المحدد") Exit Sub Else ListBox1.Items.RemoveAt(0) End If