Name
workbooks
.Add([Template
])
Synopsis
Creates a new workbook and opens it in Excel.
Argument |
Settings |
---|---|
|
The filename of a template to base the new workbook on. Alternately, this argument may be one of the following |
After calling Add
, the new workbook becomes the ActiveWorkbook
in Excel. The following line creates a workbook and returns a reference to the new Workbook
object:
Set wb = Application.Workbooks.Add
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.