ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   need help updating chart (series in dynamic range) (https://www.excelbanter.com/charts-charting-excel/20054-need-help-updating-chart-series-dynamic-range.html)

Jeff

need help updating chart (series in dynamic range)
 
Hi,
I have couple charts with series in dynamic range. In VBA, I tried to
update them using chart1.refresh. Somehow, not all the charts are updated.
Any idea?


Thanks

John Mansfield

Jeff,

You might try adding a selection change event similar to one of the two
below to the sheet module that holds the charts . . .

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Calculate
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row 1 And ActiveCell.Row < 5 Then _
ActiveSheet.Calculate
End Sub

A recalculation is forced causing the charts to update.

----
Regards,
John Mansfield
http://www.pdbook.com

"Jeff" wrote:

Hi,
I have couple charts with series in dynamic range. In VBA, I tried to
update them using chart1.refresh. Somehow, not all the charts are updated.
Any idea?


Thanks



All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com