How do I write a short piece of code that defines the specific height that I want to assign to a chart in Excel 2007?
I have multiple charts on a sheet and I want to update the vertical heights of the charts depending on the value inputted to a cell in the sheet.
Thanks
Last edited by scorpio0077; 07-19-2009 at 04:32 PM.
Do you mean the height of the chart area or of the chartobject? If it's the latter, then a loop like:
for example. Of course, you might want to move them too...Code:Dim objChtObj as ChartObject For each objChtObj in Activesheet.chartobjects objChtObj.Height = Range("A1").Value Next objChtObj
So long, and thanks for all the fish.
Hey romperstomper, Thanks for the reply. I did mean the Chart area and not the object.
What I am looking for is a way to change the Axis Option > Maximum Height across multiple charts, namely
Chart Tools > Format > Under Current Selection, choose Vertical (value) axis > Format Selection > Axis Option > Maximum Height.
I would like to enter the Maximum Height in a cell and the Maximum Value has to change accordingly.
Thanks!!
Thanks Andy!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks