Name

workbooks.Open(Filename, [UpdateLinks], [ReadOnly], [Format], [Password], [WriteResPassword], [IgnoreReadOnlyRecommended], [Origin], [Delimiter], [Editable], [Notify], [Converter], [AddToMru], [Local], [CorruptLoad])

Synopsis

Opens an existing workbook and adds it to the Workbooks collection . Returns a reference to the workbook that was opened.

Argument

Settings

Filename

The file to open.

UpdateLinks

One of these settings: 0, don’t update; 1, update external links but not remote links; 2, update remote links but not external links; 3, update all links. The default is to prompt the user.

ReadOnly

True opens the workbook as read-only; False opens as read/write. Default is False.

Format

When opening a text file, this argument specifies the column separator character as follows: 1, tab; 2, comma; 3, space; 4, semicolon; 5, no separator; 6, character specified in Delimiter argument. Default is 1.

Password

If the workbook requires a password, this is the password to open the file. The default is to prompt the user.

WriteResPassword

If the workbook has a password for write access, this is the password to write to the file. The default is to prompt the user.

IgnoreReadOnlyRecommended

True does not display Excel’s Read Only Recommended dialog if the file was saved with that option; False displays the prompt. Default is False.

Origin

Indicates the operating system that created the file. One of the following xlPlatform settings: xlWindows, xlMSDOS, xlMacintosh ...

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.