Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 1.5 KB

Excel.Application.ProtectedViewWindowOpen.md

File metadata and controls

54 lines (32 loc) · 1.5 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.ProtectedViewWindowOpen event (Excel)
vbaxl10.chm504108
vbaxl10.chm504108
Excel.Application.ProtectedViewWindowOpen
17c847d9-a9d2-28da-832a-01d7719f1248
04/05/2019
medium

Application.ProtectedViewWindowOpen event (Excel)

Occurs when a workbook is opened in a Protected View window.

Syntax

expression.ProtectedViewWindowOpen (Pvw)

expression A variable that represents an Application object.

Parameters

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

Return value

Nothing

Example

The following code example informs the user that the workbook will be opened in a Protected View window. 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_ProtectedViewWindowOpen(ByVal Pvw As ProtectedViewWindow) 
 MsgBox "You are opening the following workbook in Protected View: " _ 
 & Pvw.Caption 
End Sub

[!includeSupport and feedback]