Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming graphs to be placed in determined cell area
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming graphs to be placed in determined cell area
Try this:
Dim rng As Range Set rng = Range("A30").Resize(19, 5) With ActiveSheet.ChartObjects(1) .Top = rng.Top .Left = rng.Left .Width = rng.Width .Height = rng.Height End With Not my own (is from Tom O) Matt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
area betwen 2 graphs | Charts and Charting in Excel | |||
Getting a value from a cell that is determined by a formula | Excel Discussion (Misc queries) | |||
graphs and colouring an area | New Users to Excel | |||
PRINT AREA IN PROGRAMMING | Excel Programming | |||
Setting Print Area, includes text, numbers, charts & graphs | Excel Programming |