Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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 Error message when trying to record Macro Beth Excel Worksheet Functions 1 May 16th 10 08:32 AM
Excel 2007 Record Macro button in Developer tab is not highlighted Golfnjohn Excel Discussion (Misc queries) 0 April 30th 08 09:31 PM
Excel 2007 Macro Record jnf40 Excel Programming 4 February 24th 08 09:52 PM
Why doesn't Excel 2007 record charting and office art macro code? NOLuckMatt Excel Discussion (Misc queries) 0 August 17th 07 02:38 PM
Record Macro Excel 2007 Adrian Excel Discussion (Misc queries) 1 August 9th 07 04:48 PM


All times are GMT +1. The time now is 02:00 AM.

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"