View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default positioning charts



--
---
Regards,
Norman



"mike" wrote in message
...
I am trying to create a number of charts using VBA, but positioning the
charts is giving me trouble. Thanks in advance for any help.

My code:

Set myChart = Charts.Add
ActiveChart.ChartType = xlXYScatterLines
ActiveChart.SetSourceData
Source:=Sheets("Graph").Range(GraphRange),
PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsObject, Name:="Graph"
With myChart.Parent
.Top = Range("C2").Top
.Left = Range("C2").Left
End With

Error:
Run-time error '424'

Object required