Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 18
Default Excel 2007 Macro Problem

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
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 230
Default Excel 2007 Macro Problem

On Dec 9, 10:13 pm, Robby wrote:
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.


Microsoft.

They withdrew that functionality and added a different "improved" way
of doing it.
XL2007 graphs and charts are now an order of magnitude slower too.

Stick with 2003 until they get 2007 into decent working order.

Regards,
Martin Brown
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Excel 2007 Macro Problem

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


  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 18
Default Excel 2007 Macro Problem

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


  #5   Report Post  
Posted to microsoft.public.excel.charting
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





  #6   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Excel 2007 Macro Problem

On Dec 17 2007, 4:06*am, "Andy Pope" wrote:
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 - Excelhttp://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- Hide quoted text -


- Show quoted text -


Did you determine what the problem was? I have the exact same problem
that you described, the Axes method works fine in Excel 2003 but fails
in Excel 2007.

Thanks,
norm
  #7   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Excel 2007 Macro Problem

Hi norm,

I have not received any email, so I guess the problem still exists.
Do you have an example file with the same code error that you can send?

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
wrote in message
...
On Dec 17 2007, 4:06 am, "Andy Pope" wrote:
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 - Excelhttp://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- Hide quoted text -


- Show quoted text -


Did you determine what the problem was? I have the exact same problem
that you described, the Axes method works fine in Excel 2003 but fails
in Excel 2007.

Thanks,
norm

  #8   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Excel 2007 Macro Problem

Did anyone find a solution a have the same problem?

  #9   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Excel 2007 Macro Problem

On Jan 28, 9:35*am, Barman wrote:
Did anyone find a solution a have the same problem?


I have the problem as well. I have a lot of VBA code using this
construct. When we "upgraded" our manufacturing people to new
machines and Office 2007 all of our certification sheets for the
equipment we sell died. So much for "Compatibility Mode" ;-).
  #10   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Excel 2007 Macro Problem

Check out http://support.microsoft.com/kb/928988

The following code worked for me:

With Chart

Application.ScreenUpdating = True
.Refresh
DoEvents

.PlotArea.Width = 400
.PlotArea.Height = 290
.PlotArea.Top = 27
.PlotArea.Left = 15

Application.ScreenUpdating = False

End With

Unfortunately this seems not to work without enabling screenupdating
which in my case creates an unsightly flashing of a previously
inactive sheet AND of course slows things down further. Oddly in my
case the error only occured when .PlotArea was called for the first
time after opening the application. Thereafter everything worked as
per 2003. I imagine therefore if the user redraws the plot an
indefinite number of times in using your app that you could run the
above code once on opening and then rationalise back to the old code
for subsequent plot generations.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Problem with Filter [email protected] Excel Worksheet Functions 2 January 21st 08 07:30 AM
Excel 2007 Close problem Duane Nutley Excel Discussion (Misc queries) 4 October 4th 07 12:58 AM
Excel 2007 Bug or other problem Kevin Lutz Excel Discussion (Misc queries) 0 July 17th 07 04:08 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Excel 2007 VBA problem teepee Excel Discussion (Misc queries) 7 March 31st 07 10:56 AM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"