View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul W Smith Paul W Smith is offline
external usenet poster
 
Posts: 74
Default Copying From WB To WB

I have been looking at this for two hours now and cannot understand what
could be causing what I am seeing.

I have a WB that contains a procedure which can loop through a file listing
and copy the contents of a range onto a WKS within itself.

My issue and I will give the code below is that in some instances it copies
the values in others it copies links to the source file!!!!!!

The code is:

Set RngIn = ShtIn.Range("Export")
RngIn.Copy

ShtPaste.Activate
ShtPaste.Cells(lMaxRow, 1).Select
ShtPaste.Paste

Can anyone suggest a reason why the same code should on some occasions paste
values and others paste links (i.e just paste).

I can only conclude that it must have something to do with the source files,
but to me these look identical. I have checked the cell formats (Custom).
They were produced for the same template and the cells being copied contains
identical formulas in the cells being copied.