I assume the user is clicking a button to issue a delete command that looks at the list and sees if it has any values to be deleted. If this is the case then you can use OnClick event of you command button to check the box before the delete command is issued like so:
[tt]
If MyListBoxName.ItemsSelected.Count < 1 Then
MsgBox "No records selected to delete!"
MyListBoxName.SetFocus
Exit Sub
End If
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.