O'Reilly logo

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required