Copy Method

Applies To

Chart object, ChartArea object, ChartObject object, ChartObjects collection object, Charts collection object, OLEObject object, OLEObjects collection object, Point object, Range object, Series object, Shape object, Sheets collection object, Worksheet object, Worksheets collection object.

Description

Syntax 1: Copies the object to the Clipboard. Copies a picture of the point or series to the Clipboard.

Syntax 2: Copies the Range to the specified range or to the Clipboard.

Syntax 3: Copies the sheet to another location in the workbook.

Syntax 1

expression.Copy

Syntax 2

expression.Copy(Destination)

Syntax 3

expression.Copy(Before, After)

expression Required. An expression that returns an object in the Applies To list. To copy an entire chart sheet, use Syntax 3 with the Chart object. To copy only the chart area, use Syntax 1 with the ChartArea object.

Destination Optional Variant. Specifies the new range to which the specified range will be copied. If this argument is omitted, Microsoft Excel copies the range to the Clipboard.

Before Syntax 3: Optional Variant. The sheet before which the copied sheet will be placed. You cannot specify Before if you specify After.

After Optional Variant. The sheet after which the copied sheet will be placed. You cannot specify After if you specify Before.

Remarks

If you don't specify either Before or After, Microsoft Excel creates a new workbook that contains the copied sheet.

See Also

Move method, Paste method.

Example

This example copies Sheet1, placing the copy after Sheet3.

Worksheets("Sheet1").Copy after := Worksheets("Sheet3")
This example copies the used range on Sheet1, creates a new worksheet, and then pastes the values of the copied range onto the new worksheet.

Worksheets("Sheet1").UsedRange.Copy
Set newSheet = Worksheets.Add
newSheet.Range("A1").PasteSpecial Paste:=xlValues
This example copies the formulas in cells A1:D4 on Sheet1 into cells E5:H8 on Sheet2.

Worksheets("Sheet1").Range("A1:D4").Copy _
    destination:=Worksheets("Sheet2").Range("E5")