rutgerterhaar
New Member
- Joined
- Jan 21, 2012
- Messages
- 18
Hi there,
I was trying to add data to a chart with vba, but I can not make it work. This is my problem:
In sheet1 I have a table with a dynamic number of rows and columns. In sheet2 I have a chart (2d line) and a comboBox. The input for the combobox are the columns headers in sheet1 (column1, column2,...). The comboBox works fine and give in cell A1 the column number.
I want to write a code that adds data from sheet1 according to the columns number in the chart. So if I select in the comboBox column1, the chart has to show the data from sheet1, column1. If I select another column in the comboBox, the first data series in the chart have to be deleted en the new selection has to be shown.
I hope that the problem is clear.
Lots of thanks for your help (and understanding my crappy English)
Greetz Rutger
I was trying to add data to a chart with vba, but I can not make it work. This is my problem:
In sheet1 I have a table with a dynamic number of rows and columns. In sheet2 I have a chart (2d line) and a comboBox. The input for the combobox are the columns headers in sheet1 (column1, column2,...). The comboBox works fine and give in cell A1 the column number.
I want to write a code that adds data from sheet1 according to the columns number in the chart. So if I select in the comboBox column1, the chart has to show the data from sheet1, column1. If I select another column in the comboBox, the first data series in the chart have to be deleted en the new selection has to be shown.
I hope that the problem is clear.
Lots of thanks for your help (and understanding my crappy English)
Greetz Rutger