WORKBOOK.MOVE

Macro Sheets Only

Equivalent to choosing the Move or Copy Sheet command from the Edit menu. Moves one or more sheets between workbooks or changes a sheet's position within a workbook.

Syntax

WORKBOOK.MOVE(name_array, dest_book, position_num)
WORKBOOK.MOVE?(name_array, dest_book, position_num)

Name_array is the name of a sheet, or an array of names of sheets, that you want to move.

Dest_book is the name of the workbook to which you want to move name_array. If dest_book is omitted, WORKBOOK.MOVE moves the sheet out of the workbook and puts it in a new separate workbook. If dest_book is the same as the current book, then the sheet is moved within the workbook.

Position_num is a number that specifies the target position for the sheet within dest_book. The first position is 1.

Related Functions

WORKBOOK.COPY Copies one or more documents from their current workbook into another workbook

List of Command-Equivalent Functions