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

I have a multiselect listbox where users can select different options that
will eventually be graphed. There's is no code for the list options. I used
the properties boxes for the listbox. I want the user to be able to press a
command button after they've finished their selections to graph what they've
selected. Will I need to create a list for the listbox using VB and if so how
do I do that.

Then what code do I use to get the command button to know which items the
user selected?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Multiselect Listbox/ command button

If the user is making selections in the listbox, then it must already have a
list


for the commandbutton

With Listbox1
for i = 0 to .Listcount - 1
if .Selected(i) then
msgbox .List(i) & " is selected"
end if
next
End With

--
Regards,
Tom Ogilvy


"C Wilson" wrote:

I have a multiselect listbox where users can select different options that
will eventually be graphed. There's is no code for the list options. I used
the properties boxes for the listbox. I want the user to be able to press a
command button after they've finished their selections to graph what they've
selected. Will I need to create a list for the listbox using VB and if so how
do I do that.

Then what code do I use to get the command button to know which items the
user selected?

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

Thanks for the reply, but that's not quite what I was looking for. I want it
to graph their selections. I know I will have to hide the rows I'm just not
sure how to word it to where it will hide all the data except the selections
they made from the box.

"Tom Ogilvy" wrote:

If the user is making selections in the listbox, then it must already have a
list


for the commandbutton

With Listbox1
for i = 0 to .Listcount - 1
if .Selected(i) then
msgbox .List(i) & " is selected"
end if
next
End With

--
Regards,
Tom Ogilvy


"C Wilson" wrote:

I have a multiselect listbox where users can select different options that
will eventually be graphed. There's is no code for the list options. I used
the properties boxes for the listbox. I want the user to be able to press a
command button after they've finished their selections to graph what they've
selected. Will I need to create a list for the listbox using VB and if so how
do I do that.

Then what code do I use to get the command button to know which items the
user selected?

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 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 Francis Ang[_3_] Excel Programming 2 October 25th 04 01:57 AM
printing using vba; listbox/command button bkey01[_4_] Excel Programming 2 April 21st 04 05:54 AM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 11:48 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"