Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Changes the access permissions for the workbook. This might require an updated version to be loaded from the disk.
Namespace: Microsoft.Office.Tools.Excel
Assemblies: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
Sub ChangeFileAccess ( _
Mode As XlFileAccess, _
WritePassword As Object, _
Notify As Object _
)
void ChangeFileAccess(
XlFileAccess Mode,
Object WritePassword,
Object Notify
)
Parameters
Mode
Type: Microsoft.Office.Interop.Excel..::.XlFileAccessOne of the XlFileAccess values. Specifies the new access mode.
WritePassword
Type: System..::.ObjectSpecifies the write-reserved password if the file is write reserved and Mode is xlReadWrite. Ignored if there is no password for the file or if Mode is xlReadOnly.
Notify
Type: System..::.Objecttrue to notify the user if the file cannot be immediately accessed.
Remarks
If you have a file open in read-only mode, you do not have exclusive access to the file. If you change a file from read-only to read/write, Microsoft Office Excel must load a new copy of the file to ensure that no changes were made while you had the file open as read-only.
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.