I have a button in my program called 'Submit'. So when i click on this button i want it to display an error message if the listbox is empty. Please Help Me.
Printable View
I have a button in my program called 'Submit'. So when i click on this button i want it to display an error message if the listbox is empty. Please Help Me.
Hi,
You would test the Count property of the Items collection of the ListBox. i.e:-
Hope that helps.Code:If ListBox1.Items.Count = 0 Then
MsgBox("No Items In ListBox!")
End If
Cheers,
Ian