View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Trapping NO selections

Tom
Now I'm in a quandary. Bob says No and you say Yes. I tried the
following code and I don't get the "Nothing" MsgBox when no selections are
made. Help!! Otto
If UFMgtFee.lbNMFee.ListIndex = -1 Then
MsgBox = "Nothing"
Unload UFMgtFee
Else
'Do stuff with the selections
End If
"Tom Ogilvy" wrote in message
...
Yes.

--
Regards,
Tom Ogilvy

"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
I have a UF with a multi-selection ListBox, lbNMFee.
I want to act on the instance wherein the user makes no selections in the
ListBox. I have the following argument that is True if no selections are
made. This code is in the beginning of the macro that is called by the
OK
button click.
Is this correct? Thanks for your help. Otto

If UFMgtFee.lbNMFee.ListIndex = -1 Then