ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copied sheet not to have links (https://www.excelbanter.com/excel-programming/418993-copied-sheet-not-have-links.html)

CAPTGNVR[_2_]

Copied sheet not to have links
 
Dear All

WorksheetA; sheet1 has links to sheet2;

sheet1 is copied to another new workbook by vb using cells select, selction
copy and activesheetpaste and saved as sheet1_copy.

The problem is that the data changes in sheet1_copy when worksheetA-sheet2
data is changed.

Can u pls tell me how to get over this.

brgds/captgnvr

Alan Moseley

Copied sheet not to have links
 
You need to use the PasteSpecial method. Here is an example:-

Dim ws As Worksheet
Set ws = Sheet1
Selection.Copy
Set ws = Sheet3
ws.PasteSpecial (xlPasteValuesAndNumberFormats)
Set ws = Nothing

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"CAPTGNVR" wrote:

Dear All

WorksheetA; sheet1 has links to sheet2;

sheet1 is copied to another new workbook by vb using cells select, selction
copy and activesheetpaste and saved as sheet1_copy.

The problem is that the data changes in sheet1_copy when worksheetA-sheet2
data is changed.

Can u pls tell me how to get over this.

brgds/captgnvr


CAPTGNVR[_2_]

Copied sheet not to have links
 
Thank you Alan - it was of great assistance and especially easy to understand
code.
brgds/captgnvr
"Alan Moseley" wrote:

You need to use the PasteSpecial method. Here is an example:-

Dim ws As Worksheet
Set ws = Sheet1
Selection.Copy
Set ws = Sheet3
ws.PasteSpecial (xlPasteValuesAndNumberFormats)
Set ws = Nothing

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"CAPTGNVR" wrote:

Dear All

WorksheetA; sheet1 has links to sheet2;

sheet1 is copied to another new workbook by vb using cells select, selction
copy and activesheetpaste and saved as sheet1_copy.

The problem is that the data changes in sheet1_copy when worksheetA-sheet2
data is changed.

Can u pls tell me how to get over this.

brgds/captgnvr



All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com