|
-
Jul 20th, 2005, 10:41 AM
#1
Thread Starter
Member
runtime 1004: method of axes failed
Hi,
this line of code is giving me a method of axes failed error msg.
Can anyone fix it?
.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale
Below is the code that is before the above line:
With ActiveChart
.ChartType = xlLineMarkers
.SeriesCollection.NewSeries
'.SeriesCollection(1).AxisGroup = 2
'.SeriesCollection(2).AxisGroup = 2
.HasLegend = True
.Legend.Position = xlRight
.Axes(xlCategory).MinorTickMark = xlOutside
.Axes(xlValue).MinorTickMark = xlOutside
.ChartArea.Select
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlCategory, xlSecondary) = True
.HasAxis(xlValue, xlPrimary) = True
.HasAxis(xlValue, xlSecondary) = False
.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
'Errors here
.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale
' some more code here but doesn't involve error
End With
-
Jul 21st, 2005, 03:08 AM
#2
Re: runtime 1004: method of axes failed
Isn't is Axis ? 
Edit:
Ok it is Axes... so it must be that there is not Category property you are trying to change on that object.
Try removing the categorytype part and see if it works?
Last edited by Ecniv; Jul 21st, 2005 at 03:11 AM.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|