View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 99
Default Please explain copy/pastespecial issue

hi,

you should not delete the cell contents between action of copy and paste

Sub Demo()
Dim shtSource As Worksheet
Dim shtTarget As Worksheet
Set shtTarget = Sheets("input")
Set shtSource = Sheets("output")

With shtTarget
.Cells.Clear
shtSource.Range("A1").CurrentRegion.Copy
.Range("A1").PasteSpecial
End With
End Sub

isabelle