Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 973 Bytes

Excel.Worksheet.ProtectContents.md

File metadata and controls

38 lines (24 loc) · 973 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Worksheet.ProtectContents property (Excel)
vbaxl10.chm174090
vbaxl10.chm174090
Excel.Worksheet.ProtectContents
807717f6-1265-2d5d-5221-bc46b24d8281
05/30/2019
medium

Worksheet.ProtectContents property (Excel)

True if the contents of the sheet are protected. This protects the individual cells. To turn on content protection, use the Protect method with the Contents argument set to True. Read-only Boolean.

Syntax

expression.ProtectContents

expression A variable that represents a Worksheet object.

Example

This example displays a message box if the contents of Sheet1 are protected.

If Worksheets("Sheet1").ProtectContents = True Then 
 MsgBox "The contents of Sheet1 are protected." 
End If

[!includeSupport and feedback]