Determine If a Listbox is Empty

Hi all!

How can I determine if a Listbox is empty, for then do something?
Regards

Forget it I’m thinking to count rows if list count = 0 then do something

I’m trying to do it on CellTextPaint event.

If Row = 0 then

Msgbox "Lista Vacia"

End if

But I got no success

Event handler on CellClick or Double Click.

If Listbox.listcount = 0 Then...End If

Not sure what you’re really looking for though.

[quote=198915:@Jeffry Walsh]Event handler on CellClick or Double Click.

If Listbox.listcount = 0 Then...End If

Not sure what you’re really looking for though.[/quote]
Yeah I know. But I’m trying to do this:

When the Listbox is empty, it enables a button. every time when Listbox is refreshed.
Cuz of this I thought in CellTextPaint event

I got it, I put it on my populateListbox method and in the Open Event of the window