View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.charting
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Excel 2007 Macro Problem

Hi,

In terms of chart type I meant is it a line or column or scatter chart.

The line of code works for me so I'm not sure it's unsupported.
If you want to email the file offline I will take a look.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Robby" wrote in message
...
Hi Andy,

Thanks for your reply. Sorry I did couldn't get back to you earlier.

The type of graph I am working on includes a column as well as plot
charts,
which calculates average values on a certain date.

Below, I have provided extra code which might help:

' This line is where the Macro Crashes
ActiveChart.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale

ActiveChart.PlotArea.Select
With ActiveChart
.Axes(xlValue, xlSecondary).HasTitle = True
.Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = "Duration
Days"
End With
ActiveChart.PlotArea.Select

I would appreciate what your thoughts are. From what I undertand, the line
where the Macro crashes is supposely not supported in Excel 2007, due to
the
fact the VBA has been overhauled. Please correct me if I am wrong

Cheers

Robby




"Andy Pope" wrote:

Hi,

Can you provide more detail on the chart type and data.

The single line of code you provided worked on a column chart with date
axis.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Robby" wrote in message
...
I was just wondering if anyone knows what this message means:

"Method 'Axes' of object' _Chart failed"

The Macro works fine in Excel 2003 but crashes in Excel 2007. The line
which
seems to be casuing me grief is:

ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlCategoryScale

Could anyone let me know what the problem could be.

Cheers