LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default How do I modify charts thorugh VB

I have a spreadsheet with ~120 sheets each with one chart. I recently
modified the chart and copied the new chart to each sheet using VB to copy.
unfortunately, I realized that the sourcedata is the same sheet for all
charts. I now want to change the source data for each sheet to the range
below.

This code executes but when i check the charts, the sourcedata still refers
to the 1st sheet. What am I doing wrong?

For each ws1 in Worksheets

Set ch1 = ws1.ChartObjects.Item(1).Chart
ch1.SetSourceData Source:=Sheets(ws1.Name).Range("E84:F85"), PlotBy _
:=xlColumns





 
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
How can my colleagues modify my charts? hillmi Charts and Charting in Excel 0 February 10th 10 11:47 PM
routing email thorugh excel Marlene Excel Discussion (Misc queries) 1 October 15th 08 07:37 PM
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Modify a UDF please? Excel Helps Excel Worksheet Functions 2 January 23rd 08 09:40 AM
Modify this a bit Jay Excel Programming 5 April 22nd 05 06:43 PM


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