Partager via


Sheets.Copy Method

Copies the sheet to another location in the workbook.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Sub Copy ( _
    Before As Object, _
    After As Object _
)
'Usage
Dim instance As Sheets
Dim Before As Object
Dim After As Object

instance.Copy(Before, After)
void Copy(
    Object Before,
    Object After
)

Parameters

  • Before
    Type: System.Object

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

  • After
    Type: System.Object

    Optional Object. 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

Reference

Sheets Interface

Sheets Members

Microsoft.Office.Interop.Excel Namespace