Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
If multiselect property set to single then following will tell you if a selection is made. Dim LstSelect As Variant LstSelect = ListBox1.ListIndex If LstSelect = -1 Then MsgBox "No selection" Else MsgBox ListBox1.Value End If However, if multiselect property set to multi then Dim x As Long Dim numbSelected For x = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(x) = True Then numbSelected = numbSelected + 1 MsgBox ListBox1.List(x) End If Next x If numbSelected = 0 Then MsgBox "No Selections" End If -- Regards, OssieMac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listbox selection | Excel Discussion (Misc queries) | |||
Listbox & Selection | Excel Discussion (Misc queries) | |||
Listbox selection | Excel Programming | |||
Listbox Selection Help | Excel Programming | |||
ListBox selection | Excel Programming |