How do I got the pop up when no item is selected in the listbox?
Code:For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
SelectLayerByName (ListBox1.List(i))
End If
Next
Printable View
How do I got the pop up when no item is selected in the listbox?
Code:For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
SelectLayerByName (ListBox1.List(i))
End If
Next
Try this:
Code:SelectedCount = 0
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
SelectedCount = SelectedCount +1
SelectLayerByName (ListBox1.List(i))
End If
Next
If SelectedCount = 0 Then
MsgBox "No Item Selected"
End If
Thank you so much.. It work now