Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 : Create a Chart (record macro)
Hi there,
I am trying a very simple creation of a chart. I have recorded the macro, then removed some lines and end up with (*). When I do everything manually (when recording) everything works just fine, but when reexecuting the macro, I get a fatal error (poorly translated from french): Execution Error 1004 Error defined by application or object. When I click 'debug', the line points to: ActiveSheet.Shapes.AddChart.Select However it appears the syntax should be correct, ref: http://msdn.microsoft.com/en-us/library/bb238877.aspx Thank you ! (*) Sub Macro2() ' ' Macro2 Macro ' Range("D3,G3,J3,M3,P3,S3,V3,Y3,AB3,AE3,AH3,AK3").S elect ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range( _ "ROIs!$D$3;ROIs!$G$3;ROIs!$J$3;ROIs!$M$3;ROIs!$P$3 ;ROIs!$S $3;ROIs!$V$3;ROIs!$Y$3;ROIs!$AB$3;ROIs!$AE$3;ROIs! $AH$3;ROIs!$AK$3" _ ) ActiveChart.ChartType = xlXYScatterSmooth End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Error message when trying to record Macro | Excel Worksheet Functions | |||
Excel 2007 Record Macro button in Developer tab is not highlighted | Excel Discussion (Misc queries) | |||
Excel 2007 Macro Record | Excel Programming | |||
Why doesn't Excel 2007 record charting and office art macro code? | Excel Discussion (Misc queries) | |||
Record Macro Excel 2007 | Excel Discussion (Misc queries) |