Share via


ProtectedViewWindow.Workbook Property

Gets an object that represents the workbook that is open in the specified Protected View window.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
ReadOnly Property Workbook As Workbook
    Get
'Usage
Dim instance As ProtectedViewWindow
Dim value As Workbook

value = instance.Workbook
Workbook Workbook { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Workbook
The workbook that is open in the specified Protected View window.

Remarks

Read-only.

Because a Protected View window is designed to protect the user from potentially malicious code, the operations you can perform by using a Workbook object returned by the _Workbook method will be limited. Any operation that is not allowed will return "Run-time error 1004: This command is not available when Excel is sandboxed."

See Also

Reference

ProtectedViewWindow Interface

ProtectedViewWindow Members

Microsoft.Office.Interop.Excel Namespace