Hello everyone,

Here is my problem...

I have a chart with a secondary category axis, and I need to change
names on it. The code I have used to work fine and now it give an error
"Unable to set the CategoryNames property for Axis class".

And I think it is because CategoryNames is empty sometimes, but I am
not sure, because everytime I add myAxis object to Watch list Excel
crashes (I mean it gives me "Program preformed an unperformed
operation..." blabla "Sorry for the inconvinience").

here is my code

Set myChart = Sheets.Application.ActiveSheet.ChartObjects("Chart
1").Chart
With myChart

Set myAxis = .Axes(1, xlSecondary)
With myAxis
.CategoryNames = myCatNames 'myCatNames is an array
End With
End With


myCatNames - is an array which gets values from a specific range. And
this one works fine, because I am able to add to watch list and see
what is going on with it.

Thank you all for you feedback if any.
Ivan


P.S. Maybe when .CategoryNames is empty and I am trying to assign an
array to it then it raises error. If that's the case how to ReDim an
object property (.CategoryNames) ???


--
Intellihome
------------------------------------------------------------------------
Intellihome's Profile: http://www.msusenet.com/member.php?userid=1479
View this thread: http://www.msusenet.com/t-1870456342