View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Cleaning up code


The below code will copy all cells from Sheet1 to Sheet2.

Sheets("Sheet1").Cells.Copy Sheets("Sheet2").Range("A1")

PS: To copy all cells you can also try sheet copy...

If this post helps click Yes
---------------
Jacob Skaria


"kevin" wrote:

Hi I recorded a copy/paste special as values macro but am sure there is a
more elegant way of writing the code. what part of the code below is not
necessary?

Sheets("Market").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select

Thanks
Kevin