Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to place a text box at a specific location in the plot area of a chart
using VBA. ActiveChart.PlotArea.Left and ActiveChart.PlotArea.Width will return the left edge and width of the plot area, but the .Left function includes the "Y" axis scale as the left most point. In other words, the ..Left point is the left edge of the scale values and not the left edge of the plot area. Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select a chart, ensure it has a left value axis
Sub test2() Dim lt as single, tp as single With ActiveChart.Axes(xlValue, xlPrimary) lt = .Left tp = .Top End With ActiveChart.Shapes.AddShape 1, lt, tp, 30, 20 End Sub should add a rectangle to the top-left corner of the apparent shaded plot area, Regards, Peter T "Richard Weatherly" wrote in message ... I want to place a text box at a specific location in the plot area of a chart using VBA. ActiveChart.PlotArea.Left and ActiveChart.PlotArea.Width will return the left edge and width of the plot area, but the .Left function includes the "Y" axis scale as the left most point. In other words, the .Left point is the left edge of the scale values and not the left edge of the plot area. Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without having to assume anything about axes, use:
With ActiveChart.PlotArea lt = .InsideLeft tp = .InsideTop wd = .InsideWidth ht = .InsideHeight End With - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Peter T" <peter_t@discussions wrote in message ... Select a chart, ensure it has a left value axis Sub test2() Dim lt as single, tp as single With ActiveChart.Axes(xlValue, xlPrimary) lt = .Left tp = .Top End With ActiveChart.Shapes.AddShape 1, lt, tp, 30, 20 End Sub should add a rectangle to the top-left corner of the apparent shaded plot area, Regards, Peter T "Richard Weatherly" wrote in message ... I want to place a text box at a specific location in the plot area of a chart using VBA. ActiveChart.PlotArea.Left and ActiveChart.PlotArea.Width will return the left edge and width of the plot area, but the .Left function includes the "Y" axis scale as the left most point. In other words, the .Left point is the left edge of the scale values and not the left edge of the plot area. Any suggestions? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes that's a much better approach.
Regards, Peter T "Jon Peltier" wrote in message ... Without having to assume anything about axes, use: With ActiveChart.PlotArea lt = .InsideLeft tp = .InsideTop wd = .InsideWidth ht = .InsideHeight End With - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Peter T" <peter_t@discussions wrote in message ... Select a chart, ensure it has a left value axis Sub test2() Dim lt as single, tp as single With ActiveChart.Axes(xlValue, xlPrimary) lt = .Left tp = .Top End With ActiveChart.Shapes.AddShape 1, lt, tp, 30, 20 End Sub should add a rectangle to the top-left corner of the apparent shaded plot area, Regards, Peter T "Richard Weatherly" wrote in message ... I want to place a text box at a specific location in the plot area of a chart using VBA. ActiveChart.PlotArea.Left and ActiveChart.PlotArea.Width will return the left edge and width of the plot area, but the .Left function includes the "Y" axis scale as the left most point. In other words, the .Left point is the left edge of the scale values and not the left edge of the plot area. Any suggestions? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, I believe I have it working now.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Left/Right question | Excel Discussion (Misc queries) | |||
Left Function Question Help! | Excel Worksheet Functions | |||
PlotArea question | Charts and Charting in Excel | |||
2007 PlotArea.Left | Excel Programming | |||
Question about using the right or left formula | Excel Discussion (Misc queries) |