Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to be able to check if a listbox is empty... and then if it is do someone accordingly.

 

But i can't find something like a .isempty. How would i check to see if the listbox is empty?

 

in VB. :cool:

Posted

Yep like He said the .count. However to check it then doing something would require a statement .... you can do this several ways but as to your question you said if it is then do something so we will use an If statement

 

  If listbox1.items.count = 0 Then
   ' Do something
  End If

 

That should get it done!

 

vbMarkO

Visual Basic 2008 Express Edition!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.

×
×
  • Create New...