Remarks

For more information about using a single Workbook object, see the object.

Example

Use the property to return the Workbooks collection. The following example closes all open workbooks.

Visual Basic for Applications
Workbooks.Close

Use the method to create a new, empty workbook and add it to the collection. The following example adds a new, empty workbook to Microsoft Excel.

Visual Basic for Applications
Workbooks.Add

Use the method to open a file. This creates a new workbook for the opened file. The following example opens the file Array.xls as a read-only workbook.

Visual Basic for Applications
Workbooks.Open FileName:="Array.xls", ReadOnly:=True
workbooks collection Workbooks Collection Object

See also: