View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
anon anon is offline
external usenet poster
 
Posts: 77
Default Copying cells from one worksheet to another, within the sameworkbook

The part that simply copies the values is the line;

..PasteSpecial (xlValues)

If you add in this line;

..PasteSpecial (xlFormats)

underneath it will also copy the formatting. So this part of the code
would be;

With Selection
..PasteSpecial (xlValues)
..PasteSpecial (xlFormats)
End With
End Sub