Workbooks Collection [Excel 2003 VBA Language Reference]
Application Workbooks Workbook Multiple objects |
A collection of all the Workbook objects that are currently open in the Microsoft Excel application.
Using the Workbooks Collection
Use the Workbooks property to return the Workbooks collection. The following example closes all open workbooks.
Workbooks.Close
Use the Add method to create a new, empty workbook and add it to the collection. The following example adds a new, empty workbook to Microsoft Excel.
Workbooks.Add
Use the Open 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.
Workbooks.Open FileName:="Array.xls", ReadOnly:=True
For more information about using a single Workbook object, see the Workbook object.
Properties | Application Property | Count Property | Creator Property | Item Property | Parent Property
Methods | Add Method | CanCheckOut Method | CheckOut Method | Close Method | Open Method | OpenDatabase Method | OpenText Method | OpenXML Method
Parent Objects | Application
Child Objects | Chart | CustomViews | Mailer | Names | PublishObjects | RoutingSlip | Sheets | SmartTagOptions | Styles | WebOptions | Windows | XmlMaps | XmlNamespaces