PC Review


Reply
Thread Tools Rate Thread

How do I set the Maximum Property for this Chart in code

 
 
Ayo
Guest
Posts: n/a
 
      13th Apr 2009
".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 With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      13th Apr 2009
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" <(E-Mail Removed)> wrote in message
news:E73D3576-3F86-40FD-B2F5-(E-Mail Removed)...
> ".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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum property of ProgressBar Curious Microsoft Dot NET 10 21st Jun 2008 03:55 PM
property with defalut value will not be called in auto-generated code, and how to make a property only visible at design time? Ryan Liu Microsoft C# .NET 2 27th Aug 2006 03:09 PM
Named range, maximum characters in RefersTo property Jason Coley Microsoft Excel Programming 1 2nd Mar 2006 09:51 PM
Scrollbar maximum property? Thorbjørn Jørgensen Microsoft C# .NET 3 5th Mar 2005 04:35 PM
Set Rowsource property for Chart Control using VB code ge liu Microsoft Access Reports 7 8th Aug 2003 10:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:40 PM.