From: Cummings on
Hi, all,

I have a nice little macro that creates two charts on several worksheets in
a workbook.

My problem is that it places one chart right on top of the other. I just
need to offset it enough to see both charts, or at least to remind myself
that there are two of them there.

I tried variations of the "Activechart.parent . . . ." commands I found
elsewhere on the site, but I always get the debug screen when I get there.

I'm using OFFICE 2007 and Vista.

Thank you

Jim
--
JP Cummings
From: Robert Flanagan on
Assuming you know what cell you want as the top left cell position for the
chart, you can do something like this:

Dim chtObj As ChartObject
Set chtObj = ActiveSheet.ChartObjects(1)
chtObj.Left = Cells(2, 2).Left
chtObj.Top = Cells(2, 2).Top

and for the 2nd chart, just modify to set its position.

If you type "chtObj." (don't forget the period), you will see a set of
properties, many of which you can set.

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Cummings" <jim.cummings(a)regermailnospam.com> wrote in message
news:3F872327-2065-48F3-B606-78118471B17D(a)microsoft.com...
> Hi, all,
>
> I have a nice little macro that creates two charts on several worksheets
> in
> a workbook.
>
> My problem is that it places one chart right on top of the other. I just
> need to offset it enough to see both charts, or at least to remind myself
> that there are two of them there.
>
> I tried variations of the "Activechart.parent . . . ." commands I found
> elsewhere on the site, but I always get the debug screen when I get there.
>
> I'm using OFFICE 2007 and Vista.
>
> Thank you
>
> Jim
> --
> JP Cummings