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

Hello
I can create a multiselect list box using either the forms or control
toolbox. I can click on multiple items to select them but thats it. How do
I take the selection and do something useful with it (Preferably with forms).
How can I make the selections appear as a list on the worksheet? Do I have
to do it with VB? If so how?
Many thanks
Neil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default How do I use a multiselect listbox

The selection is stored in an array, who's dimension is the same as the list
item count. Each selected item is set True.
Use a loop to read all items in the control testing the Selected property
for this value.

for i = 0 to ListBox.ListCount - 1
if ListBox.Selected(i) Then _
' act on the selected value e.g. ListBox.List(i)
next i




--
Cheers
Nigel



"Neil Murphy" <Neil wrote in message
...
Hello
I can create a multiselect list box using either the forms or control
toolbox. I can click on multiple items to select them but thats it. How
do
I take the selection and do something useful with it (Preferably with
forms).
How can I make the selections appear as a list on the worksheet? Do I
have
to do it with VB? If so how?
Many thanks
Neil



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How do I use a multiselect listbox

With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
j = j + 1
Cells(j,"A").Value = .List(i)
End If
Next i
End With



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Neil Murphy" <Neil wrote in message
...
Hello
I can create a multiselect list box using either the forms or control
toolbox. I can click on multiple items to select them but thats it. How

do
I take the selection and do something useful with it (Preferably with

forms).
How can I make the selections appear as a list on the worksheet? Do I

have
to do it with VB? If so how?
Many thanks
Neil



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
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
Bug in multiselect listbox? Jos Vens[_2_] Excel Programming 2 February 8th 06 08:41 PM
MultiSelect ListBox StephanieH Excel Programming 5 November 20th 04 12:29 AM
Multiselect Listbox Francis Ang[_3_] Excel Programming 0 October 27th 04 02:21 AM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 03:03 AM.

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"