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: 62
Default Chart Source when copying sheets to new file.

I am using VBA to copy select sheets to a new file and saving that new file.
Some sheets have charts, others the source for those charts. But the charts
in the new file point back to the original file, even though I have also
copied the source sheets into the new file with the same command using this
code:

Dim mySheet As Worksheet
Dim sheetList As Variant

ReDim sheetList(1 To ActiveWorkbook.Sheets.Count)
i = 0 'initialize variable
For Each mySheet In ActiveWorkbook.Sheets
If mySheet.Name < "CHARTS (2)" And mySheet.Name < "TABLE" Then
i = i + 1
sheetList(i) = mySheet.Name
End If
Next
ReDim Preserve sheetList(1 To i)
Sheets(sheetList).Copy

Is there any way to make the new charts get their source from the new source
sheets, or do I have to use SaveCopyAs and save the entire file instead?

Thanks,

Keithlo
 
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
One Chart, Same Data ranges, different source sheets Greg in CO[_2_] Charts and Charting in Excel 4 March 12th 10 02:57 PM
Error Copying File or Folder message when copying file to CD [email protected] Excel Programming 0 August 2nd 08 05:43 PM
Vba code for migrating data from source file to w/book sheets. TUNGANA KURMA RAJU Excel Programming 0 March 13th 07 04:32 AM
copying and pasting from source sheet to destination sheet without naming source sht? Simon Lloyd[_753_] Excel Programming 5 June 2nd 06 06:11 PM
Chart source data when copying from one workbook to another Drew Lettington Excel Programming 5 October 22nd 04 12:15 AM


All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"