_Worksheet.Move Method
Moves 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 Move ( _
Before As Object, _
After As Object _
)
'Usage
Dim instance As _Worksheet
Dim Before As Object
Dim After As Object
instance.Move(Before, After)
void Move(
Object Before,
Object After
)
Parameters
Before
Type: System.ObjectOptional Object. The sheet before which the moved sheet will be placed. You cannot specify Before if you specify After.
After
Type: System.ObjectOptional Object. The sheet after which the moved 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 moved sheet.