Copy related procedures in class Worksheet (Excel VBA)

This page presents procedures from class Worksheet related to the theme Copy: Sheets.Copy, Copy and Worksheets.Copy

Sheets.Copy

Copies the sheet to another location in the workbook.

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

Copy (Before, After)

Worksheets("Sheet1").Copy After:=Worksheets("Sheet3")

Arguments

The following arguments are optional

Before (Chart) - The sheet before which the copied sheet will be placed. You cannot specify Before if you specify After.

After (Chart) - The sheet after which the copied sheet will be placed. You cannot specify After if you specify Before.

Copy

Copies the sheet to another location in the current workbook or a new workbook.

If you don't specify either Before or After, Microsoft Excel creates a new workbook that contains the copied Worksheet object. The newly created workbook holds the Application.ActiveWorkbook property and contains a single worksheet. The single worksheet retains the Name and CodeName properties of the source worksheet. If the copied worksheet held a worksheet code sheet in a VBA project, that is also carried into the new workbook. An array selection of multiple worksheets can be copied to a new blank Workbook object in a similar manner.

Copy (Before, After)

Worksheets("Sheet1").Copy After:=Worksheets("Sheet3")

Arguments

The following arguments are optional

Before (Chart) - The sheet before which the copied sheet will be placed. You cannot specify Before if you specify After.

After (Chart) - The sheet after which the copied sheet will be placed. You cannot specify After if you specify Before.

Worksheets.Copy

Copies the sheet to another location in the workbook.

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

Copy (Before, After)

Worksheets("Sheet1").Copy After:=Worksheets("Sheet3")

Arguments

The following arguments are optional

Before (Chart) - The sheet before which the copied sheet will be placed. You cannot specify Before if you specify After.

After (Chart) - The sheet after which the copied sheet will be placed. You cannot specify After if you specify Before.