Hi Experts
You may help in this one.
I have a workbook that open and copy another workbook (with one sheet).
Thiworkbook copied contains 17 columns and an increasing number of cells (right now about 180). It change fortnight and I run a macro that:
-copy the workbook
-display a report with data in visual manner.
-create pivot tables as request
-verify if report has been copied, tables created,
Now, I have those pivot tables and would like to create a chart for each table.
I have the following code (appologies for the code as HTML Maker does not work, and appologies for the spanish words
tipogra on array for the few grafic choices availables
posigraf1 for the chart start cell (array)
posigraf2 for the chart end cell (array)
tableta with the pivottable range
For z = 0 To 7
tabladin = "Tabla dinámica" & (z + 1)
Worksheets("grafi").Shapes.AddChart(tipogra(z), _
Left:=Worksheets("grafi").Range(posigraf1(z)).Left, _
Top:=Worksheets("grafi").Range(posigraf1(z)).Top, _
Width:=Worksheets("grafi").Range(posigraf2(z)).Width, _
Height:=Worksheets("grafi").Range(posigraf2(z)).Height).Select
ActiveChart.SetSourceData Source:=Worksheets("Tabla").Range(tableta(z))
ActiveChart.ChartStyle = 1
ActiveChart.ApplyLayout (4)
Next z
SO far the code works fine, display the choosen graf types, located and right layout, but....
it display the first pivottable data only. The pivot tables works perfectly.
I have tried different codes to clean the cache but nothing works.
I will appreciate your help
Many Thanks
Alb
You may help in this one.
I have a workbook that open and copy another workbook (with one sheet).
Thiworkbook copied contains 17 columns and an increasing number of cells (right now about 180). It change fortnight and I run a macro that:
-copy the workbook
-display a report with data in visual manner.
-create pivot tables as request
-verify if report has been copied, tables created,
Now, I have those pivot tables and would like to create a chart for each table.
I have the following code (appologies for the code as HTML Maker does not work, and appologies for the spanish words
tipogra on array for the few grafic choices availables
posigraf1 for the chart start cell (array)
posigraf2 for the chart end cell (array)
tableta with the pivottable range
For z = 0 To 7
tabladin = "Tabla dinámica" & (z + 1)
Worksheets("grafi").Shapes.AddChart(tipogra(z), _
Left:=Worksheets("grafi").Range(posigraf1(z)).Left, _
Top:=Worksheets("grafi").Range(posigraf1(z)).Top, _
Width:=Worksheets("grafi").Range(posigraf2(z)).Width, _
Height:=Worksheets("grafi").Range(posigraf2(z)).Height).Select
ActiveChart.SetSourceData Source:=Worksheets("Tabla").Range(tableta(z))
ActiveChart.ChartStyle = 1
ActiveChart.ApplyLayout (4)
Next z
SO far the code works fine, display the choosen graf types, located and right layout, but....
it display the first pivottable data only. The pivot tables works perfectly.
I have tried different codes to clean the cache but nothing works.
I will appreciate your help
Many Thanks
Alb