Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default How do I set the Maximum Property for this Chart in code

".Axes(xlValue).MaximumScale =" don't work inside the With ChtObj.Chart

Set ChtObj = Worksheets(shtName).ChartObjects.Add(Left:=375, Top:=7,
Width:=575, Height:=360)

With ChtObj.Chart
.ChartType = xlColumnClustered
.Legend.Position = xlLegendPositionBottom
.SetSourceData Source:=ActiveSheet.Range("$K$26:$L$" & rngLength)
.SeriesCollection(1).Name = "Quantity by Date"
.HasTitle = True
.ChartTitle.Text = ChtName

With .SeriesCollection.NewSeries
.Values = Sheets(shtName).Range("$M$26:$M$" & rngLength)
.XValues = Sheets(shtName).Range("$K$26:$K$" & rngLength)
.Name = "Cumulative Quantity"
.ChartType = xlLine
End With
.SeriesCollection(2).AxisGroup = 2
End With

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default How do I set the Maximum Property for this Chart in code

The line of code isn't included in the quoted routine.

- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______


"Ayo" wrote in message
...
".Axes(xlValue).MaximumScale =" don't work inside the With ChtObj.Chart

Set ChtObj = Worksheets(shtName).ChartObjects.Add(Left:=375, Top:=7,
Width:=575, Height:=360)

With ChtObj.Chart
.ChartType = xlColumnClustered
.Legend.Position = xlLegendPositionBottom
.SetSourceData Source:=ActiveSheet.Range("$K$26:$L$" & rngLength)
.SeriesCollection(1).Name = "Quantity by Date"
.HasTitle = True
.ChartTitle.Text = ChtName

With .SeriesCollection.NewSeries
.Values = Sheets(shtName).Range("$M$26:$M$" & rngLength)
.XValues = Sheets(shtName).Range("$K$26:$K$" & rngLength)
.Name = "Cumulative Quantity"
.ChartType = xlLine
End With
.SeriesCollection(2).AxisGroup = 2
End With



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
How find maximum top+height property of a collection of shapes Chet Excel Programming 2 February 20th 07 04:52 PM
Line Chart Maximum AntnyMI Excel Discussion (Misc queries) 1 October 23rd 06 12:10 AM
Named range, maximum characters in RefersTo property Jason Coley Excel Programming 1 March 2nd 06 09:51 PM
Excel can't execute minimum / maximum scale property danz98 Excel Programming 2 August 24th 05 08:38 PM
fixing a maximum chart value Cenk Ursavas via OfficeKB.com Charts and Charting in Excel 0 May 10th 05 06:06 PM


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