View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Listbox Value = Null ??

If you make the listbox single select instead of multiselect, they can only
select one item.


"Ryan H" wrote in message
...
I have a list box and a command button on a userform. When the command
button is clicked I want to test to ensure the user has selected only 1
item
in the listbox. I have this but it doesn't work and I don't know why, any
ideas?

' ensure a part number is selected to edit
If lbxPreview.Value = Null Then
MsgBox "Please select a Part Number from the list to edit.",
vbCritical
Exit Sub
End If

--
Cheers,
Ryan