Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Placement of a chart

I've got code to add a chart to my worksheet (below).

Range("A1:A10").Select
Charts.Add
ActiveChart.ChartType = xl3DColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Results").Range("A1:A10"),
PlotBy:= _
xlRows
ActiveChart.Location Whe=xlLocationAsObject, Name:="Test"

Now if I want to move that chart, I can use the following code.

ActiveSheet.Shapes("Chart 1").IncrementLeft -63#
ActiveSheet.Shapes("Chart 1").IncrementTop -153#

Is there a way I can specify exactly where I want the left side of the chart
to start. For example, if I want the chart to start where column F starts,
how could I do this?

Thanks,
Paul

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Placement of a chart

Ok,

I came up with this method.

ActiveSheet.Shapes("Chart 1").Left = ActiveSheet.Columns(6).Left
ActiveSheet.Shapes("Chart 1").Top = ActiveSheet.Rows(1).Top

This starts the left side of the chart at the start of column F, and the Top
side of the chart at the start of Row 1.



"PCLIVE" wrote in message
...
I've got code to add a chart to my worksheet (below).

Range("A1:A10").Select
Charts.Add
ActiveChart.ChartType = xl3DColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Results").Range("A1:A10"),
PlotBy:= _
xlRows
ActiveChart.Location Whe=xlLocationAsObject, Name:="Test"

Now if I want to move that chart, I can use the following code.

ActiveSheet.Shapes("Chart 1").IncrementLeft -63#
ActiveSheet.Shapes("Chart 1").IncrementTop -153#

Is there a way I can specify exactly where I want the left side of the
chart to start. For example, if I want the chart to start where column F
starts, how could I do this?

Thanks,
Paul


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
decimal placement in an excel chart? Ron Charts and Charting in Excel 1 March 8th 08 02:12 AM
Cell placement Dianethetech Excel Worksheet Functions 4 May 17th 07 08:50 PM
Picture Placement pkenny Excel Discussion (Misc queries) 1 June 6th 06 05:24 PM
Name Placement lsmft Excel Discussion (Misc queries) 7 March 2nd 06 12:16 AM
Tab placement Spiff Excel Discussion (Misc queries) 1 September 15th 05 02:04 PM


All times are GMT +1. The time now is 10:35 AM.

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

About Us

"It's about Microsoft Excel"