Chart Question

  • Thread starter Thread starter WhytheQ
  • Start date Start date
W

WhytheQ

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
 
You also need the .Chart

ActiveSheet.ChartObjects(1).Chart.etc

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top