Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 1
Default VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007

Hello,

I have a spreadsheet that I use to create a Word doc report that
containes a chart graph.

Using VBA, for each row in the spreadsheet, I copy the values of the
row to a separate sheet that has the chart. The values go into the
same cells every time and the chart references those cells. After
copying the values over to the sheet with the chart on it, the chart
is selected and then pasted into a new page in the Word document.

Then the next row of values is copied over to the chart sheet and the
new chart is copied and inserted into a new page in the word doc.

As you can see, I don't want that chart in Word to be linked to Excel
because the values that the chart references are being changed every
loop through the rows in excel.

Here is the code that does the copy and paste - this worked perfectly
in office 2003

Range("A1:I49").Copy
appWD.Selection.Paste
appWD.Selection.InsertBreak Type:=wdSectionBreakNextPage

However, in 2007, this results in a linked chart so that after the
macro is done, all charts on all pages of the word doc display the
same values - the values of the last row in Excel.

I have tried this code and found that the results are exactly the
same:

Range("A1:I49").Copy
appWD.Selection.PasteExcelTable False, False, False
appWD.Selection.InsertBreak Type:=wdSectionBreakNextPage

This makes sense but how do i paste it so that the chart itself is not
linked?

I could copy as picture, but the quality of the result is not as good
- it is just for printing though so I suppose I could go that way if I
have to.

Thanks!

Matt

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
line chart plots false value and the real value on same date Isabel Charts and Charting in Excel 0 February 10th 10 01:18 PM
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
False if statement in series results in zero value in chart GoingBonkers Charts and Charting in Excel 2 February 13th 07 06:50 PM
$C$1972,2,FALSE, $C$1972,3,FALSE is ok, But $C$1972,4,FALSE Give # Steved Excel Worksheet Functions 6 July 3rd 06 01:49 AM
True Or False, no matter what... it still displays the false statement rocky640[_2_] Excel Programming 2 May 13th 04 04:57 PM


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