Results 1 to 6 of 6

VBA copied chart keeps on pointing to original data, VBA relinking charts to nesource data

Threaded View

dastr VBA copied chart keeps on... 03-23-2013, 04:59 AM
dastr Re: VBA copied chart keeps on... 03-23-2013, 03:08 PM
AB33 Re: VBA copied chart keeps on... 03-23-2013, 07:58 PM
dastr Re: VBA copied chart keeps on... 03-23-2013, 10:18 PM
Sean Thomas Re: VBA copied chart keeps on... 03-24-2013, 04:55 AM
dastr Re: VBA copied chart keeps on... 03-25-2013, 06:58 AM
  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    15

    VBA copied chart keeps on pointing to original data, VBA relinking charts to nesource data

    Dear all,

    I have a chart linked to a source data on sheet "Pattern". I want to copy and paste the chart and the table on multiple sheets. I have managed so far to create the multiple sheets in VBA but when I copy and paste the table and charts on the newly created worksheets, I either have all the newly pasted charts linking to the original data
    (table) on worksheet "Pattern" or I paste the tables but not the charts.

    Can someone help? Ideally I would like to paste a chart and a table on a new worksheet (say WS "English") and have the chart on WS English being linked to the table on the same worksheet?

    Here I am attaching the example.
    Thanks in advance.

    Sub CreateManyWorksheets()
        'Create the worksheets for all regions
        For Each cell In Selection
            ThisWS = cell.Value
            Worksheets.Add after:=Worksheets(Worksheets.Count)
            ActiveSheet.Name = ThisWS
        Next cell
        
    
    ' COPY THE PATTERN
        
    Worksheets("Pattern").Range("A3:Z10").Copy Destination:=Worksheets("Maths").Range("A2:Z10")
    Worksheets("Pattern").Range("A3:Z10").Copy Destination:=Worksheets("English").Range("A2:Z10")
        
    End Sub
    Attached Files Attached Files
    Last edited by dastr; 03-23-2013 at 03:07 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1