Hi,
I have a list box, and I create a button to automatically select all the items in that listbox.
here's the code:
the problem is the vba never went to IF clause (always go to ELSE), so there should be a problem. Can anyone help?Is the condition will always false?
I have a list box, and I create a button to automatically select all the items in that listbox.
here's the code:
Code:
If UnitIDBox.ListCount = 0 Then
MsgBox ("The list is empty")
Exit Sub
End If
If IsNull(UnitIDBox.ItemsSelected) Then
Call SelectAll(Forms!FrmWholeDelivery!UnitIDBox)
MsgBox ("A")
Else
Call ClearList(Forms!FrmWholeDelivery!UnitIDBox)
MsgBox ("B")
End If
the problem is the vba never went to IF clause (always go to ELSE), so there should be a problem. Can anyone help?Is the condition will always false?