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

I have a listbox with with its properties set to mutliselect and is popupated
with "Apples, Oranges, Peaches, Grapes, Apricot and Guava.

When the user select say, Oranges and Grapes, I want these to be displayed
but do not know how to write the code. I have looked at previous postings
but the responses only dealt with showing the listindex value instead of the
actual description. Can someone help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Multiselect Listbox

With Userform1
rw = 1
for i = 0 to .Listbox1.Listcount - 1
if .listbox1.Selected(i) then
cells(rw,1).Value = .listbox1.List(i)
rw = rw + 1
end if
Next
End with

--
Regards,
Tom Ogilvy

"Francis Ang" wrote in message
...
I have a listbox with with its properties set to mutliselect and is

popupated
with "Apples, Oranges, Peaches, Grapes, Apricot and Guava.

When the user select say, Oranges and Grapes, I want these to be displayed
but do not know how to write the code. I have looked at previous postings
but the responses only dealt with showing the listindex value instead of

the
actual description. Can someone help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Multiselect Listbox

Thank you very much Tom. Really appreciate your help.


"Tom Ogilvy" wrote:

With Userform1
rw = 1
for i = 0 to .Listbox1.Listcount - 1
if .listbox1.Selected(i) then
cells(rw,1).Value = .listbox1.List(i)
rw = rw + 1
end if
Next
End with

--
Regards,
Tom Ogilvy

"Francis Ang" wrote in message
...
I have a listbox with with its properties set to mutliselect and is

popupated
with "Apples, Oranges, Peaches, Grapes, Apricot and Guava.

When the user select say, Oranges and Grapes, I want these to be displayed
but do not know how to write the code. I have looked at previous postings
but the responses only dealt with showing the listindex value instead of

the
actual description. Can someone help!




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
Cannot dropitem from multiselect listbox ej_user Excel Programming 7 October 21st 04 01:03 AM
MultiSelect ListBox in Excel PeteSmith Excel Programming 1 April 20th 04 11:14 AM
Excel VBA-Looping though MultiSelect on ListBox jpendegraft[_3_] Excel Programming 2 February 3rd 04 04:38 PM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


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

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"