Name
worksheet
.Move(Before, After
)
Synopsis
Moves the specified sheet to another location in the workbook.
Argument |
Settings |
---|---|
|
Specifies an existing worksheet if you want to place the worksheet before that sheet |
|
Specifies an existing worksheet if you want to place the worksheet after that sheet |
The following code moves the KarmaFactor worksheet after the WombatBattingAverages worksheet:
ActiveWorkbook.Worksheets("KarmaFactor").Move After:=Worksheets("WombatBattingAverages")
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.