Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
First, I don't do much with charts. You may want to post specific Charting
questions to the .charting newsgroup. But I put used controls from the control toolbox toolbar and placed them on Sheet1. I used a listbox and a commandbutton. This is the code that I used to find out what was selected in that listbox. Option Explicit Private Sub CommandButton1_Click() Dim iCtr As Long Dim myStr As String Dim cCtr As Long With Me.ListBox1 For iCtr = 0 To .ListCount - 1 myStr = "" If .Selected(iCtr) Then 'do your graphing 'just for testing For cCtr = 0 To .ColumnCount - 1 myStr = myStr & ";" & .List(iCtr, cCtr) Next cCtr If myStr < "" Then myStr = Mid(myStr, 2) MsgBox myStr End If Else 'do nothing End If Next iCtr End With End Sub Private Sub Worksheet_Activate() Dim myRng As Range With Worksheets("sheet1") Set myRng = .Range("B2:F" & .Cells(.Rows.Count, "B").End(xlUp).Row) End With With Me.ListBox1 .MultiSelect = fmMultiSelectMulti .ColumnHeads = True .ColumnCount = 5 .ListFillRange = myRng.Address(external:=True) End With End Sub I chose to use worksheet_activate to populate the listbox. This means that you have to leave the sheet and return to it to have it updated. You may want to use a different method (workbook_open???). Good luck on the .charting questions. Michael wrote: Dave Peterson wrote in message ... How about using a listbox? You can set that to allow multiple selections. Michael wrote: Hi everyone, I use ComboBox button to make a selection on graphs A, B, C,.....etc.; one at a time How can I make ComboBox button accept more than one selection; 2 or more? Thanks, Mike Hi again, Here is how I have the table on one sheet: No InModel Resp Depl AgVr Leth 1 1 0.743 0.507 0.589 0.502 2 1 0.713 0.507 0.594 0.543 3 1 0.635 0.507 0.594 0.452 4 1 0.744 0.521 0.589 0.593 5 1 0.609 0.507 0.594 0.643 6 1 0.660 0.704 0.669 0.814 7 1 0.715 0.528 0.594 0.543 8 9 10 11 12 13 14 15 16 17 18 19 20 On a 2nd sheet, I have the chart where as many as 20 solutions could be graphed. Now, on the 2nd sheet, I want to find a way to scroll through solutions 1-by-1 or even show 2 ro more at a time WITHOUT the need of visiting of the table sheet at all? How can I do so? Regards, Mike -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Making random and unique selections from a list | Excel Discussion (Misc queries) | |||
Clear Option Button Selections | Excel Discussion (Misc queries) | |||
Making multiple selections from Excel drop down lists | Excel Worksheet Functions | |||
Making a button to sort | Excel Worksheet Functions | |||
count and limit radio button selections | Excel Worksheet Functions |