LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How to make chart embedded in active sheet?

When I record making a chart embedded in the sheet I get this:

Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("testsheet"). _
Range("J3:K14"), PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsObject, Name:= _
"testsheet"

But this doesn't work as it falls over at the line where the location is
set:

Set objChart = Charts.Add

With objChart
.Location xlLocationAsObject, strName
.ChartType = xlColumnClustered
.SetSourceData _
Source:=rngRange, _
PlotBy:=xlColumns
End With

The error will be:
runtime error 1004, method location of object chart failed.
A chart has already been made, but not this is a chart in a new chartsheet
and I don't want that.
How should this be done?


RBS


 
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
Copy sheet and make new sheet active belvy123 Excel Discussion (Misc queries) 5 April 24th 08 03:33 PM
how do i make a chart follow the active cell mepetey Charts and Charting in Excel 2 October 20th 07 07:29 PM
Embedded Chart in Excel Sheet George Charts and Charting in Excel 3 August 4th 05 12:19 PM
How to find a Chart embedded in a Sheet? Gilroy Excel Programming 1 June 27th 04 03:29 AM
print embedded active chart programmatically tag Excel Programming 0 August 13th 03 05:15 PM


All times are GMT +1. The time now is 11:37 PM.

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"