Chapter 9. Working with Workbooks and Files

Open a Workbook

You can use the Open method with the WorkBooks object to open a workbook. This is similar to clicking the File tab and using the menu to open a workbook. Each time you open a new workbook, Excel adds the workbook to the Workbooks collection.

The Open method has 16 parameters. This section discusses the FileName, WriteResPassword, Password, ReadOnly, IgnoreReadOnlyRecommended, and AddToMru parameters. Refer to VBA help for a discussion of the remaining parameters.

Use the FileName parameter to specify the workbook you want to open. You can use the name of the workbook if the workbook is located in the current folder. If the workbook is located in another folder, enter the path to the workbook. ...

Get Excel® Programming: Your visual blueprint™ for creating interactive spreadsheets 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.