Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CHARTING CODE ERROR | Excel Discussion (Misc queries) | |||
replace VBA run-time error message with custom message | Excel Programming | |||
VBA error in charting function. Help! | Excel Programming | |||
Charting error in Excel2003 | Charts and Charting in Excel | |||
changing the message in an error message | Excel Worksheet Functions |