Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
Excel 2007 Macro Problem
Did anyone find a solution a have the same problem?
|
#9
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Problem with Filter | Excel Worksheet Functions | |||
Excel 2007 Close problem | Excel Discussion (Misc queries) | |||
Excel 2007 Bug or other problem | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Excel 2007 VBA problem | Excel Discussion (Misc queries) |