Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
line chart plots false value and the real value on same date | Charts and Charting in Excel | |||
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 | Excel Discussion (Misc queries) | |||
False if statement in series results in zero value in chart | Charts and Charting in Excel | |||
$C$1972,2,FALSE, $C$1972,3,FALSE is ok, But $C$1972,4,FALSE Give # | Excel Worksheet Functions | |||
True Or False, no matter what... it still displays the false statement | Excel Programming |