_Workbook.ChangeFileAccess(XlFileAccess, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Changes the access permissions for the workbook. This may require an updated version to be loaded from the disk.
public void ChangeFileAccess (Microsoft.Office.Interop.Excel.XlFileAccess Mode, object WritePassword, object Notify);
Public Sub ChangeFileAccess (Mode As XlFileAccess, Optional WritePassword As Object, Optional Notify As Object)
Parameters
- Mode
- XlFileAccess
Required XlFileAccess. Specifies the new access mode.
- WritePassword
- Object
Optional Object. Specifies the write-reserved password if the file is write reserved and Mode
is xlReadWrite. Ignored if there's no password for the file or if Mode
is xlReadOnly.
- Notify
- Object
Optional Object. True (or omitted) to notify the user if the file cannot be immediately accessed.
Remarks
If you have a file open in read-only mode, you don't have exclusive access to the file. If you change a file from read-only to read/write, Microsoft 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.