Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default multiselect listbox

Good Day Group,

What syntax to use to state that a MultiSelect
Listbox has no selection? To be used in the context:
If ListBox1 .....no selection.... Then etc...

Brgds

CG Rosén



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default multiselect listbox

Try this

N = 0
For i = 0 To Userform1.ListBox1.ListCount - 1
If Userform1.ListBox1.Selected(i) = True Then
N = N + 1
End If
Next i
If N = 0 Then MsgBox "no selection"


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"CG Rosén" wrote in message ...
Good Day Group,

What syntax to use to state that a MultiSelect
Listbox has no selection? To be used in the context:
If ListBox1 .....no selection.... Then etc...

Brgds

CG Rosén





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default multiselect listbox

Listbox1.ListIndex = -1


"CG Rosén" wrote in message
...
Good Day Group,

What syntax to use to state that a MultiSelect
Listbox has no selection? To be used in the context:
If ListBox1 .....no selection.... Then etc...

Brgds

CG Rosén





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a multiselect drop down list Yve Excel Worksheet Functions 2 January 22nd 09 07:29 PM
Multiselect Validation (dropdown) Multiselect in cell validations Excel Discussion (Misc queries) 1 December 22nd 06 07:36 AM
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
Multiselect Boxes Jase Excel Programming 2 October 22nd 03 03:40 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"