Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
area betwen 2 graphs Travis Charts and Charting in Excel 5 January 17th 08 09:09 AM
Getting a value from a cell that is determined by a formula carl43m Excel Discussion (Misc queries) 3 August 14th 06 06:31 PM
graphs and colouring an area Debra Dalgleish New Users to Excel 0 December 26th 04 06:01 PM
PRINT AREA IN PROGRAMMING JOE Excel Programming 2 August 24th 04 04:01 AM
Setting Print Area, includes text, numbers, charts & graphs Arawn Excel Programming 3 August 28th 03 03:34 AM


All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"