Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Name a chart and copy it to another sheet


Hi,
I'm new to excel macros - this is my first one that isn't just a bunc
of pieced together recordings.. (instead it's a bunch of piece
together bits from the web!) Anyway, I'm creating a chart and placin
it in a summary sheet - I then need to be able to refer to it by nam
and make a copy of it to a specific range in another worksheet (ideall
I would be able to size it by placing the left at a particular range an
the right at another range etc.. so that it fits perfectly between som
cells.)

Here is the part that creates the chart - I'm stumbling with a way t
name it - there are different ways to do it depending on how the char
was created - but I don't understand the object model enough to figur
it out.

After I name it how can I make a copy and paste to another sheet

Any ideas???


Dim myChtObj As ChartObject

Set myChtObj = ActiveSheet.ChartObjects.Add _
(Left:=Range("m" & I + 10).Left + 5
Width:=Range("m" & I + 10).Width - 10, Top:=Range("m" & I + 10).Top
8, Height:=Range("m" & I + 10).Height - 10)

With myChtObj.Chart
.ChartType = xlXYScatter

Set srsNew
myChtObj.Chart.SeriesCollection.NewSeries

With srsNew
.name = "EtchRate A/(min)"
.Values
Sheets(ERsheetname(I)).Range("L14:L" & totalpostrows(I) + 13)
.XValues
Sheets(ERsheetname(I)).Range("E14:E" & totalpostrows(I) + 13)
End With

.Legend.delete
.ChartTitle.delete
.PlotArea.ClearFormats


Thanks so much,
Lui

--
li
-----------------------------------------------------------------------
lif's Profile: http://www.excelforum.com/member.php...fo&userid=3574
View this thread: http://www.excelforum.com/showthread.php?threadid=56682

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
copy chart formatting and chart templates in Excel 2007 Astelix Charts and Charting in Excel 4 March 4th 10 04:10 AM
Macro Copy Excel Chart Sheet to PowePoint - Mod of Jon Peltier code Frank Hayes[_2_] Charts and Charting in Excel 6 January 22nd 08 12:26 AM
How do you link chart source data when you copy the chart? mamagirl Charts and Charting in Excel 1 December 8th 06 02:40 AM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
Copy chart sheet without links Nigel[_6_] Excel Programming 2 November 16th 03 08:25 AM


All times are GMT +1. The time now is 06:12 AM.

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

About Us

"It's about Microsoft Excel"