Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Chart Question

Can the following be done in one line:

'============================================
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SetSourceData source:=Range("R30:R42")
'============================================

the following seems intuitive but doesn't work:

'============================================
ActiveSheet.ChartObjects(1).SetSourceData source:=Range("R30:R42")
'============================================

I don't understand why the object (ChartObjects(1)?) doesn't support
the property (SetSourceData?)

Any help greatly appreciated.
JasonQ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Chart Question

You also need the .Chart

ActiveSheet.ChartObjects(1).Chart.etc

Regards,
Peter T

"WhytheQ" wrote in message
...
Can the following be done in one line:

'============================================
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SetSourceData source:=Range("R30:R42")
'============================================

the following seems intuitive but doesn't work:

'============================================
ActiveSheet.ChartObjects(1).SetSourceData source:=Range("R30:R42")
'============================================

I don't understand why the object (ChartObjects(1)?) doesn't support
the property (SetSourceData?)

Any help greatly appreciated.
JasonQ



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Chart Question

On 14 Feb, 17:53, "Peter T" <peter_t@discussions wrote:
You also need the .Chart

ActiveSheet.ChartObjects(1).Chart.etc

Regards,
Peter T

"WhytheQ" wrote in message

...



Can the following be done in one line:


'============================================
ActiveSheet.ChartObjects(1).Activate
ActiveChart.SetSourceData source:=Range("R30:R42")
'============================================


the following seems intuitive but doesn't work:


'============================================
ActiveSheet.ChartObjects(1).SetSourceData source:=Range("R30:R42")
'============================================


I don't understand why the object (ChartObjects(1)?) doesn't support
the property (SetSourceData?)


Any help greatly appreciated.
JasonQ- Hide quoted text -


- Show quoted text -




Thanks
J
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
Chart Question dhstein Excel Discussion (Misc queries) 3 June 14th 09 08:01 PM
Pie Chart Question Bill Charts and Charting in Excel 3 March 8th 09 07:41 AM
Chart Question Xl2007 Charts and Charting in Excel 1 November 11th 08 05:31 AM
3d chart question [email protected] Charts and Charting in Excel 2 December 22nd 06 10:32 AM
Chart VBA Question Barb Reinhardt Charts and Charting in Excel 4 January 14th 06 03:26 PM


All times are GMT +1. The time now is 03:42 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"