Creating Line Graph using Command Button based on the Inputs from Multi-select Listbox

oredroc

New Member
Joined
Sep 9, 2014
Messages
1
Hi guys, I'm new here and probably the most noob in the world of excel and VBA programming.

Recently, we are creating a sort of calculator for Tuberculosis (TB). One part of which is the generation of graph based on the data provided by the World Health Organization.

I have successfully created a multiselect activeX listbox which contains check box of TB parameters such as prevalence, incidence, detection rate and so on...Im not using a user form the list box and the command button are just embedded in the worksheet

Here are my concerns:
1. What code am I going to assign to the command button such that it generates one LINE graph based on the checked items in the list box (the user may check one or multiple items in the list box).
2. the list box and the command button is in the worksheet named "main" and when the command button is pressed to generate the graph it will go to another worksheet named "graph" wherein the chart will appear.
3. For the line graph the y-axis is the value of the parameters which will be labeled based on the selected parameter on the checkbox and the x-axis will contain the years (from 1990-2012).
4. When multiple parameters are selected in the listbox the graph will have a legend to differentiate from one another.

Please help me guys I was searching the net and fora for codes but was unsuccessful. Thanks a lot. More power.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top