• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

update vba code to affect all charts in workbook not just sheet

animalfarm

New Member
I have vba to adjust the y-axis on all of my charts that I found online (it updates charts when you click on any chart in a sheet).

The following code works great as a workbook_change event that updates all cells on a sheet when a cell changes. It is pasted below. Is there a way to adjust it to update all of the graphs in the workbook (I have 100+ sheets) and not simply for one sheet?

Thank you.

>>> use code - tags <<<
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'PURPOSE: Run AdjustVerticalAxis macro when Cell C2 is changed

If Target = Range("C2") Then Call AdjustVerticalAxis

End Sub
 
Last edited by a moderator:
It would help to see the code for AdjustVerticalAxis.
It would help even more if you could attach a workbook to experiment on.
 
Back
Top