XLL+ Class Library (6.3)

CXlMacros::Open

Opens an existing workbook

static int Open(
   LPCTSTR file_text,
   short int update_links = 0,
   bool read_only = false,
   unsigned short format = 0,
   LPCTSTR prot_pwd = 0,
   LPCTSTR write_res_pwd = 0,
   bool ignore_rorec = false,
   unsigned short file_origin = 0,
   LPCTSTR custom_delimit = 0,
   bool editable = false,
   unsigned short file_access = 0,
   bool notify_logical = false
);

Parameters

file_text

File_text is the name, as text, of the workbook you want to open.

update_links

Update_links specifies whether and how to update external and remote references.

read_only

Read_only corresponds to the Read Only check box in the Open dialog box.

format

Format specifies what character to use as a delimiter when opening text files. A value of 0 is treated as a missing argument.

prot_pwd

Prot_pwd is the password, as text, required to unprotect a protected file.

write_res_pwd

Write_res_pwd is the password, as text, required to open a read-only file with full write privileges.

ignore_rorec

Ignore_rorec is a logical value that controls whether the read-only recommended message is displayed.

file_origin

File_origin is a number specifying whether a text file originated on the Macintosh or in Windows. A zero value is treated as a missing argument.

custom_delimit

Custom_delimit is the character you want to use as a custom delimiter when opening text files.

editable

Editable is a logical valule that corresponds to opening a file (such as a template) while holding down SHIFT key.

file_access

File_access is a number specifying how the file is to be accessed. A zero value is treated as a missing argument.

notify_logical

Notify_logical is a logical value that specifies whether the user should be notified when the shared document is available to be opened across a network.

Return Value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlMacros Class | CXlMacros Methods