Move 方法 (Excel)Worksheet.Move method (Excel)

将工作表移到工作簿中的其他位置。Moves the sheet to another location in the workbook.

语法Syntax

表达式移动(之前之后)expression.Move (Before, After)

_表达式_一个代表**工作表** 对象的变量。expression A variable that represents a Worksheet object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
BeforeBefore 可选Optional VariantVariant 在其之前放置移动工作表的工作表。The sheet before which the moved sheet will be placed. 如果指定了 After,则无法指定 BeforeYou cannot specify Before if you specify After.
AfterAfter 可选Optional VariantVariant 在其之后放置移动工作表的工作表。The sheet after which the moved sheet will be placed. 如果指定了 Before,则不能指定 AfterYou cannot specify After if you specify Before.

注解Remarks

如果不指定_Before_或_After_, Microsoft Excel 将新建一个包含已移动的工作表的工作簿。If you don't specify either Before or After, Microsoft Excel creates a new workbook that contains the moved sheet.

示例Example

此示例将当前活动工作簿的 Sheet1 移到 Sheet3 之后。This example moves Sheet1 after Sheet3 in the active workbook.

Worksheets("Sheet1").Move _ 
 after:=Worksheets("Sheet3")

另请参阅See also

Worksheet 对象Worksheet Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.