LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 93
Default Cannot change series..help!


' Also, chart size slowly gets LARGER.

Sub Macro7()
'
' Macro7: Chart titles and positions change OK; cannot change series

TitleName = "Stripper Well Survey - "
Windows("StripperWellsMod.xls").Activate
Sheets("Charts").Select
Range("A1").Select
SheetRow = 1
ChartNum = 1
CTitle = TitleName + Sheets("#of wells").Cells(43 + ChartNum, 2).Value
' With Worksheets("Charts").ChartObjects(1).Chart <---does not work here
' so be eXplicit..
With Worksheets("Charts").ChartObjects("Chart 1").Chart
.HasTitle = True
.ChartTitle.Text = CTitle
.ChartArea.Copy
End With
For ChartNum = 2 To 5
CTitle = TitleName + Sheets("#of wells").Cells(43 + ChartNum, 2).Value
RowLoc = LTrim(Str$(43 + ChartNum))
ChartName = "Chart" + Str$(ChartNum) 'eg: Chart 2
SheetRow = SheetRow + 21
' Series_1 = "='#of wells'!$C$" + RowLoc + ":$BQ$" + RowLoc
' Series_2 = "=Production!$C$" + RowLoc + ":$BQ$" + RowLoc
' Alternate eXplicit form for ChartNum=2
Series_1 = "='#of wells'!R45C3:R45C69"
Series_2 = "=Production!R45C3:R45C69"
With Worksheets("Charts")
.Paste
With .ChartObjects(.ChartObjects.Count)
.Top = Worksheets("Charts").Cells(SheetRow, 1).Top
.Left = Worksheets("Charts").Cells(SheetRow, 1).Left
' Following does not work; "Unable to set the Values property of the
Series class"
' Furthermore, it looks like a number of charts were made one on top of
' the other, and titles were rotated, charts looks squashed and
' Hexcel barfed, writing to "error log" which cannot be found.
' .Chart.SeriesCollection(1).Values = Series_1
With .Chart
.HasTitle = True
.ChartTitle.Text = CTitle
.ChartArea.Copy
End With
End With
End With
' Following does not work; "Object doesn't support this property or method"
' Worksheets("Charts").SeriesCollection(1).Values = Series_1
Next ChartNum
' Following does not work; "Unable to set the Values property of the
Series class"
' With ActiveSheet.ChartObjects
' .Item(.Count).Chart.SeriesCollection(1).Values =
"=Production!$C$45:$BQ$45"
' End With

' deliberate error to force allowance of debug
ActiveChart.ChartTitle = "foo"
End Sub
 
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
Fill Series Dates: not letting me change the series from year to m Mike Excel Discussion (Misc queries) 1 January 24th 08 05:08 PM
series name change Daniel Charts and Charting in Excel 1 August 14th 07 10:30 PM
How to change transparency of series Christine Ma[_2_] Charts and Charting in Excel 1 April 25th 07 10:19 AM
How do I change a number in one cell to change a series of cells? lance559 Excel Discussion (Misc queries) 2 January 13th 06 08:56 PM
how do I change a line series to a column series in excel? Mati Charts and Charting in Excel 1 May 12th 05 09:32 AM


All times are GMT +1. The time now is 12:52 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"