ajwillshire
New Member
- Joined
- Mar 4, 2009
- Messages
- 31
Hi,
I've got a routine which builds up a chart using VBA using values created in a table. In the table the user has the option of plotting a series on the primary or secondary axis and it will be assigned there using the .Axisgroup property.
So far so good.
However, I want to add titles to the axes which is easy for the category axis and the primary value axis. The problem is checking if the secondary axis has been created or not. If it hasn't been created and my code tries to edit it then I get an error.
I guess I could resolve this with just an "On error, resume next" but ideally I'd like a line of code which will tell me if the axis exists so that I can exclude the formatting using an If statement.
Can anyone help?
Many thanks in advance,
Andrew
I've got a routine which builds up a chart using VBA using values created in a table. In the table the user has the option of plotting a series on the primary or secondary axis and it will be assigned there using the .Axisgroup property.
So far so good.
However, I want to add titles to the axes which is easy for the category axis and the primary value axis. The problem is checking if the secondary axis has been created or not. If it hasn't been created and my code tries to edit it then I get an error.
I guess I could resolve this with just an "On error, resume next" but ideally I'd like a line of code which will tell me if the axis exists so that I can exclude the formatting using an If statement.
Can anyone help?
Many thanks in advance,
Andrew