Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I tell when no selection has been made when a user has clicked OK on
my UserForm that contains text and list boxes? I get the text box input and the listbox selections fine, but none of the following tests identify when the user fails to select anything in the list box. If IsEmpty(InAIOwner) Then MsgBox "..." If Len(InAIOwner) = 0Then MsgBox "..." If InAIOwner = "" Then MsgBox "..." How do I test for no selection? I appreciate your help, -John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
If nothing is selscted then the ListIndex property is less than zero. Zero is the first item in the list. HTH. Best wishes Harald "John" wrote in message ... How do I tell when no selection has been made when a user has clicked OK on my UserForm that contains text and list boxes? I get the text box input and the listbox selections fine, but none of the following tests identify when the user fails to select anything in the list box. If IsEmpty(InAIOwner) Then MsgBox "..." If Len(InAIOwner) = 0Then MsgBox "..." If InAIOwner = "" Then MsgBox "..." How do I test for no selection? I appreciate your help, -John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listbox selection | Excel Discussion (Misc queries) | |||
Listbox selection | Excel Programming | |||
Listbox Selection Help | Excel Programming | |||
Listbox Selection | Excel Programming | |||
ListBox selection | Excel Programming |