Share via


WorksheetClass.Protect Method

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

Syntax

'Declaration
Public Overridable Sub Protect ( _
    Password As Object, _
    DrawingObjects As Object, _
    Contents As Object, _
    Scenarios As Object, _
    UserInterfaceOnly As Object, _
    AllowFormattingCells As Object, _
    AllowFormattingColumns As Object, _
    AllowFormattingRows As Object, _
    AllowInsertingColumns As Object, _
    AllowInsertingRows As Object, _
    AllowInsertingHyperlinks As Object, _
    AllowDeletingColumns As Object, _
    AllowDeletingRows As Object, _
    AllowSorting As Object, _
    AllowFiltering As Object, _
    AllowUsingPivotTables As Object _
)
'Usage
Dim instance As WorksheetClass
Dim Password As Object
Dim DrawingObjects As Object
Dim Contents As Object
Dim Scenarios As Object
Dim UserInterfaceOnly As Object
Dim AllowFormattingCells As Object
Dim AllowFormattingColumns As Object
Dim AllowFormattingRows As Object
Dim AllowInsertingColumns As Object
Dim AllowInsertingRows As Object
Dim AllowInsertingHyperlinks As Object
Dim AllowDeletingColumns As Object
Dim AllowDeletingRows As Object
Dim AllowSorting As Object
Dim AllowFiltering As Object
Dim AllowUsingPivotTables As Object

instance.Protect(Password, DrawingObjects, _
    Contents, Scenarios, UserInterfaceOnly, _
    AllowFormattingCells, AllowFormattingColumns, _
    AllowFormattingRows, AllowInsertingColumns, _
    AllowInsertingRows, AllowInsertingHyperlinks, _
    AllowDeletingColumns, AllowDeletingRows, _
    AllowSorting, AllowFiltering, AllowUsingPivotTables)
public virtual void Protect(
    Object Password,
    Object DrawingObjects,
    Object Contents,
    Object Scenarios,
    Object UserInterfaceOnly,
    Object AllowFormattingCells,
    Object AllowFormattingColumns,
    Object AllowFormattingRows,
    Object AllowInsertingColumns,
    Object AllowInsertingRows,
    Object AllowInsertingHyperlinks,
    Object AllowDeletingColumns,
    Object AllowDeletingRows,
    Object AllowSorting,
    Object AllowFiltering,
    Object AllowUsingPivotTables
)

Parameters

Implements

_Worksheet.Protect(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

See Also

Reference

WorksheetClass Class

WorksheetClass Members

Microsoft.Office.Interop.Excel Namespace