Import Data and create charts in Excel sheet using Excel VBA active X combo box drop down selection

praveen123

New Member
Joined
Dec 26, 2012
Messages
2
I am trying to use Excel VBA to import data into my active workbook and then use two combo boxes(which should get populated once the data is imported) drop down menu's to make a selection of any two variables from the data and create a choice of chart(Line, Scatter etc). I have already done the import data part but facing a problem in using combo boxes. Please somebody can guide me in the right direction with the code.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to MrExcel.

Maybe this will help you:

Select a Chart Type Using a List Box or Drop Down

Hi Andrew ,
Thanks for responding!

I am enclosing a sample table( though this is not fixed)

DateVar 1Var 2Var 3Var 4Var 5

<tbody>
</tbody>
What I am trying to do is have two drop down menu's which can automatically populate itself with the column headers( here Var 1, Var 2, Var3 etc) and then using these choices to create charts of my choice( line, bar or scatter).

Tasks:
- Two drop downs needed.
- The dropdowns should be dynamic to populate itself with the column headers (var1, var2 var3 etc here) based on the data imported.
- Once the selection is done, chart can be created to analyse to the two selections( line, bar or scatter)

I am really new to VBA and hence facing huge problem in coding for this. Would appreciate your help if you can help out with the code.
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,049
Members
449,206
Latest member
Healthydogs

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