ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set position of excel chart to cell A1 (https://www.excelbanter.com/excel-programming/360914-set-position-excel-chart-cell-a1.html)

Jasonm

Set position of excel chart to cell A1
 
I have created code to insert a chart into an excel worksheet, but the
placement is not exactly where I would like to see it. I would like to be
able to give the chart an absolute position such as Cell A1.

Does anyone know how I can do this?

Thanks in advance for your assistance.

jasonm



Chip Pearson

Set position of excel chart to cell A1
 
Try code like

With ActiveSheet.ChartObjects(1)
.Top = Range("A1").Top
.Left = Range("A1").Left
End With



"Jasonm" wrote in message
...
I have created code to insert a chart into an excel worksheet,
but the placement is not exactly where I would like to see it. I
would like to be able to give the chart an absolute position
such as Cell A1.

Does anyone know how I can do this?

Thanks in advance for your assistance.

jasonm




Jasonm

Set position of excel chart to cell A1
 
Chip, Thanks for the direction! That did the trick.

I am fairly new to using VBS in excel... I do it in access quite a bit,
but... I am trying to make a wokrsheet that will display any chart that the
user wants at the touch of a button. This gets me one step closer!

Thanks again.

Jasonm

"Chip Pearson" wrote in message
...
Try code like

With ActiveSheet.ChartObjects(1)
.Top = Range("A1").Top
.Left = Range("A1").Left
End With



"Jasonm" wrote in message
...
I have created code to insert a chart into an excel worksheet, but the
placement is not exactly where I would like to see it. I would like to be
able to give the chart an absolute position such as Cell A1.

Does anyone know how I can do this?

Thanks in advance for your assistance.

jasonm







All times are GMT +1. The time now is 11:02 PM.

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