PC Review


Reply
Thread Tools Rate Thread

Copied sheet not to have links

 
 
CAPTGNVR
Guest
Posts: n/a
 
      24th Oct 2008
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
 
Reply With Quote
 
 
 
 
Alan Moseley
Guest
Posts: n/a
 
      24th Oct 2008
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

 
Reply With Quote
 
CAPTGNVR
Guest
Posts: n/a
 
      25th Oct 2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When a sheet is copied, i want also that the Sub's whithin this sheet is copied to the new sheet Luc Microsoft Excel Programming 2 12th Jan 2010 05:49 AM
copied formulas refer to destination sheet not source sheet Dantron Microsoft Excel Worksheet Functions 2 21st Oct 2009 09:51 PM
Graph links to copied sheet Miguel M Microsoft Excel Charting 1 24th Jun 2009 02:55 AM
Name of sheet required to be adjusted when copied from sheet to sheet Mike B Microsoft Excel Worksheet Functions 2 5th Aug 2003 11:11 AM
Programatically Breaking Links of Copied Chart Sheet Matthew Wieder Microsoft Excel Programming 1 18th Jul 2003 04:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:02 AM.