Class ProtectedViewWindow (Excel VBA)

The class ProtectedViewWindow represents a Protected View window.

Class Application gives access to class ProtectedViewWindow.

Member in collection

Item

To use a ProtectedViewWindow class variable it first needs to be instantiated, for example

Dim pvw as ProtectedViewWindow
Set pvw = Application.ActiveProtectedViewWindow

The following procedures can be used to set variables of type ProtectedViewWindow: Application.ActiveProtectedViewWindow, ProtectedViewWindows.Item and ProtectedViewWindows.Open.

For Each

Here is an example of processing the ProtectedViewWindow items in a collection.

Dim pvw As ProtectedViewWindow
For Each pvw In Application.ProtectedViewWindows
	
Next pvw

Methods

Activate - Brings the Protected View window to the front of the z-order.

Close - Closes the specified Protected View window.

Edit - Opens the workbook that is open for editing in the specified Protected View window.

ProtectedViewWindows.Open - Opens the specified workbook in a new Protected View window.

Properties

Caption (Default member) - Returns or sets a value that represents the name that appears in the title bar of the Protected View window. SourceName (Default member) - Returns the name of the source file that is open in the specified Protected View window. SourcePath (Default member) - Returns the path of the source file that is open in the specified Protected View window. ProtectedViewWindows.Item (Default member) - Returns a single object from a collection.

EnableResize true if the Protected View window can be resized.

Height returns or sets a value that represents the height, in points, of the Protected View window.

Left returns or sets a value that represents the distance, in points, from the left edge of the client area to the left edge of the Protected View window.

Top returns or sets a value that represents the distance, in points, from the top edge of the specified Protected View window to the top edge of the usable area.

Visible returns or sets a value that determines whether the specified Protected View window is visible.

Width returns or sets a value that specifies the width, in points, of the specified Protected View window.

WindowState returns or sets the state of the specified Protected View window.

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

ProtectedViewWindows.Count returns a Long value that represents the number of objects in the collection.

Workbook - Represents a Microsoft Excel workbook.