Programming graphs to be placed in determined cell area
Ranges (i.e. cells) have a top, left, width and height property, and so do
ChartObjects. So set them equal; e.g. for fitting a chart to the range
B2:F20 you could do this:
Set MyGraph = Worksheets("SheetName").ChartObjects(1)
Set MyRange = Worksheets("SheetName").Range("B2:F20")
MyGraph.Top = MyRange.Top
MyGraph.Left = MyRange.Left
MyGraph.Width = MyRange.Width
MyGraph.Height = MyRange.Height
--
- K Dales
"Moises" wrote:
I created a macro that genereates a set of graphs from a determined number of
data in an array, everytime that the program creates a graph , this graph is
placed in a specific (fixed) place in the sheet, what should I do to move the
graph every time it is created to a cell area that I know and I can control ?
Thanks for your help
Moises
|