View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Chart Question Using VBA

In the code where you are creating the chart, use a .Location statement to
tell Excel to place the chart as an object on a specified sheet (in this case
the active sheet). For example,

Dim sht As String
sht$ = ActiveSheet.Name
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData _
Source:=Sheets(sht$).Range("A5:E26"), PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsObject, Name:=sht$

Hope this helps,

Hutch

"Sandy" wrote:

How do I add a chart to he active worksheet? It always makes a new sheet.

Thanks