Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I add a chart to he active worksheet? It always makes a new sheet.
Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Step 4 of the chart wizard asks you where you want the chart to land. Ensure
that it is object in ??? sheet and not as new sheet... -- HTH... Jim Thomlinson "Sandy" wrote: How do I add a chart to he active worksheet? It always makes a new sheet. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom, Thankyou - worked perfectly.
Can you tell me how to place the chart on the sheet where I want it? Thanks again, Sandy "Tom Hutchins" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Chart Question | Excel Discussion (Misc queries) | |||
Pie Chart Question | Charts and Charting in Excel | |||
pie chart question | Excel Discussion (Misc queries) | |||
Bar Chart Question | Excel Discussion (Misc queries) | |||
another chart question | Excel Programming |