ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Position chart (https://www.excelbanter.com/excel-programming/316264-position-chart.html)

David

Position chart
 
Hi Group,
Looked through several sources, but can not seem to find
the code to make a chart the upper left corner at "L2." I
know it exits, because I have done it before, but cn not
remmber the syntax.
Thanks

David

Position chart
 
There is another way, where you designate the cell where
you want the upper left of the chart to be, but I can not
remeber the syntax. thanks David
-----Original Message-----
David,
<Object Browser
Property TopLeftCell As Range
read-only
Member of Excel.ChartObject
</Object Browser

Unless there's another way ??

NickHK


"David" wrote in

message
...
Hi Group,
Looked through several sources, but can not seem to

find
the code to make a chart the upper left corner

at "L2." I
know it exits, because I have done it before, but cn

not
remmber the syntax.
Thanks



.


NickHK

Position chart
 
David,
<Object Browser
Property TopLeftCell As Range
read-only
Member of Excel.ChartObject
</Object Browser

Unless there's another way ??

NickHK


"David" wrote in message
...
Hi Group,
Looked through several sources, but can not seem to find
the code to make a chart the upper left corner at "L2." I
know it exits, because I have done it before, but cn not
remmber the syntax.
Thanks




NickHK

Position chart
 
David,
That's what this property shows, but as you see the object browser is saying
it is read-only.

Maybe:
Do Until MyChart.TopLeftCell.Column=MyRange.Column
MyChart.Left=MyChart.Left+1
Loop

NickHK

"David" wrote in message
...
There is another way, where you designate the cell where
you want the upper left of the chart to be, but I can not
remeber the syntax. thanks David
-----Original Message-----
David,
<Object Browser
Property TopLeftCell As Range
read-only
Member of Excel.ChartObject
</Object Browser

Unless there's another way ??

NickHK


"David" wrote in

message
...
Hi Group,
Looked through several sources, but can not seem to

find
the code to make a chart the upper left corner

at "L2." I
know it exits, because I have done it before, but cn

not
remmber the syntax.
Thanks



.




Andy Pope

Position chart
 
Hi,

Try this,

ActiveChart.Parent.Left = Range("L2").Left
ActiveChart.Parent.Top = Range("L2").Top

Cheers
Andy

David wrote:

There is another way, where you designate the cell where
you want the upper left of the chart to be, but I can not
remeber the syntax. thanks David

-----Original Message-----
David,
<Object Browser
Property TopLeftCell As Range
read-only
Member of Excel.ChartObject
</Object Browser

Unless there's another way ??

NickHK


"David" wrote in


message

...

Hi Group,
Looked through several sources, but can not seem to


find

the code to make a chart the upper left corner


at "L2." I

know it exits, because I have done it before, but cn


not

remmber the syntax.
Thanks



.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

David

Position chart
 
Thanks, this does exactly what I want it to do. The
syntax is differant than what I used before, so I think
there is another way to do it. But it works great.
Thanks, again.
-----Original Message-----
Hi,

Try this,

ActiveChart.Parent.Left = Range("L2").Left
ActiveChart.Parent.Top = Range("L2").Top

Cheers
Andy

David wrote:

There is another way, where you designate the cell

where
you want the upper left of the chart to be, but I can

not
remeber the syntax. thanks David

-----Original Message-----
David,
<Object Browser
Property TopLeftCell As Range
read-only
Member of Excel.ChartObject
</Object Browser

Unless there's another way ??

NickHK


"David" wrote in


message

.. .

Hi Group,
Looked through several sources, but can not seem to


find

the code to make a chart the upper left corner


at "L2." I

know it exits, because I have done it before, but cn


not

remmber the syntax.
Thanks


.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
.



All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com