Name
worksheets.Add(Before, After, Count, Type)
Synopsis
Creates one or more worksheets. If you create a single worksheet, it is the active sheet. If you create more than one worksheet, the last sheet created is the active sheet.
|
Argument |
Settings |
|---|---|
|
|
Specifies an existing worksheet if you want to place the new worksheet before that sheet. |
|
|
Specifies an existing worksheet if you want to place the new worksheet after that sheet. |
|
|
Specifies the number of sheets to be added if you want to create more than one sheet. |
|
|
Use |
The following code creates two worksheets after the WombatBattingAverages worksheet:
ActiveWorkbook.Sheets.Add After:=Worksheets("WombatBattingAverages"), Count:=2Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access