Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Multiselect List Box

Hello All,
I have a list box that I populate using the following code:

Load Userform1
Userform1.varinclude.Clear
For i = 1 To NV
Userform1.varinclude.AddItem VarNames(i)
Next i

I know I can use "selected" to determine what has been selected in the list
box. Is there a quick way of telling if nothing has been selected? I can
set of for loop to see if each selected is false, but though there might be
a quicker way.

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Multiselect List Box

Bill,

You could use the Listbox's change event to set a flag, but you won't be able to tell if an item is
selected and then de-selected, just that an item was (at some time) selected.

HTH,
Bernie
MS Excel MVP


"Bill" wrote in message
ink.net...
Hello All,
I have a list box that I populate using the following code:

Load Userform1
Userform1.varinclude.Clear
For i = 1 To NV
Userform1.varinclude.AddItem VarNames(i)
Next i

I know I can use "selected" to determine what has been selected in the list box. Is there a quick
way of telling if nothing has been selected? I can set of for loop to see if each selected is
false, but though there might be a quicker way.

Thanks.



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
List Box Multiselect Form ann_nyc Excel Programming 5 October 12th 05 07:03 PM
Coding with pivots and Multiselect list job Excel Programming 3 February 1st 05 12:13 AM
List Box - MultiSelect Bill[_28_] Excel Programming 2 January 31st 05 10:31 PM
Multiselect list box ptaylor[_2_] Excel Programming 5 January 28th 05 05:35 PM


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

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

About Us

"It's about Microsoft Excel"