Chart Names

T

Tony M

Hi everyone,

I'm sorry if this is an easy one but I just can't figure
it out.

I have a worksheet with 3 charts on it. I need to write
some VBA to select each chart in turn and change its axis
settings.

So I figured the first thing to do is to name the charts
so that I can select them properly in the VBA. But how do
I name a chart??? If I select the chart I get "Chart Area"
in the name box and I can't edit it.

Many thanks for any help,
Tony M
 
D

Debra Dalgleish

As answered in .programming --

Hold the Ctrl key and click on the chart to select it.
Click in the Name Box, type a new name, then press the Enter key
 
J

Jon Peltier

Tony -

If you're doing all the charts, use this so you don't need the names:

For Each oChtOb is ActiveSheet.ChartObjects
With oChtOb.Chart.Axes(1, 1)
...
End With
Next

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top