Hi all of you,
I have around 9 charts in my workbook and a sheet with 9 embedded charts. I am varying parameters and noting the variation in these charts. The problem is when I change a parameter, I use macro code to update all the axes. But the following code is very slow. It seems to me that updating the embedded charts takes much longer since if I comment out that portion of the code, the changes are pretty fast. What are the ways to speed this thing up? Any help is greatly appreciated.
Regards,
Ram
''' Update the 9 charts
Dim shVs_x As Sheets ''' charts with 'x' (length) on x axis
Dim ch As Chart
Set shVs_x = Sheets(Array(1, 2, 3, 4, 5, 6, 7, 8, 9)) ''' collection of charts to be updated
For Each ch In shVs_x
With ch.Axes(xlCategory)
.MinimumScale = minval
.MaximumScale = maxval
End With
Next ch
''' Update the embedded charts
Dim chO As ChartObject
For Each chO In wsPlots.ChartObjects
With chO.Chart.Axes(xlCategory)
.MinimumScale = minval
.MaximumScale = maxval
End With
Next chO
Bookmarks