Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.46 KB

Excel.Application.ProtectedViewWindowDeactivate.md

File metadata and controls

53 lines (31 loc) · 1.46 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.ProtectedViewWindowDeactivate event (Excel)
vbaxl10.chm504113
vbaxl10.chm504113
Excel.Application.ProtectedViewWindowDeactivate
39df50ca-53e0-784a-a803-e9ac6f456d11
04/05/2019
medium

Application.ProtectedViewWindowDeactivate event (Excel)

Occurs when a Protected View window is deactivated.

Syntax

expression.ProtectedViewWindowDeactivate (Pvw)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Pvw Required ProtectedViewWindow An object that represents the deactivated Protected View window.

Return value

Nothing

Example

The following code example minimizes any Protected View window when it is deactivated. This code must be placed in a class module, and an instance of that class must be correctly initialized.

For more information about how to use event procedures with the Application object, see Using events with the Application object.

Private Sub App_ProtectedViewWindowDeactivate(ByVal Pvw As ProtectedViewWindow) 
 Pvw.WindowState = xlProtectedViewWindowMinimized 
End Sub

[!includeSupport and feedback]