Need sample code that I can expand on
I want to create a graph, line, that is controlled by a form. On the form the user can select from a list of data sources with check boxes and the graph will update to show the data they have selected. I am not hooked on check boxes, another method such as a list box would be fine.
The data sources are spread across various sheets, in rows, and are not all in one compact place.
Example: The form might have the following choices with check boxes.
2. Portfolio Income
3. Rental Income
If the user wanted to see all 3 onthe graph, select them all, otherwise select just the ones to display on the graph.
I also want to put a list box on the form so the user can can vary the number of years of data plotted.
I just need some sample code, with 3 ranges, to do this, I can then expand it for my application. My guess is that it would be a series of if statements based onthe value of the check box.
If the graph would update while the form is open that would be better than updating when the form is closed.
Sample code, not a finished app.
1. An excel workbook with 3 data ranges, rows, on different sheets. The data values represent years, one value per year.
2. A line graph on a sheet graphing those 3 ranges.
3. A user form listing each of the three ranges either with check boxes or in a list box, so a user can select 1 or more of them at a time.
4. As the user selects a range from the form, the appropriate range(s) is displayed on the graph.
5. A list box on the form so the use can enter the number of years of data to be displayed for all ranges. 1- 10 or 1-15 for example.
6. A sample of everything except the code is attached to this bid.