LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Charting error message

Could someone help me figure out this error message:

" Method 'Axes' of object '_Chart' failed "

I am getting the error on the line: " With .Axes(xlValue, xlSecondary) " in
the following code segment.

Sub createChart()
Dim ChtObj As ChartObject
Dim ChtName As String

Set ChtObj = ActiveSheet.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$40")

With .SeriesCollection.NewSeries
.Values = Sheets("SAP# 13195").Range("$M$26:$M$40")
.XValues = Sheets("SAP# 13195").Range("$K$26:$K$40")
.Name = "Cumulative Quantity"
.ChartType = xlLineMarkers

End With

With .Axes(xlValue, xlSecondary)
.MaximumScale = dYmax ' Constant value
.MinimumScale = dYmin ' VBA variable
.MajorUnit = 50
End With

End With

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
CHARTING CODE ERROR Jase Excel Discussion (Misc queries) 6 April 11th 08 07:32 PM
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
VBA error in charting function. Help! 3PhaseMacroMan Excel Programming 1 December 28th 05 05:40 PM
Charting error in Excel2003 Julie Charts and Charting in Excel 1 October 19th 05 11:42 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


All times are GMT +1. The time now is 07:13 AM.

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"