Name

workbook.UnprotectSharing([SharingPassword])

Synopsis

Removes file sharing from a protected/shared workbook.

Argument

Settings

SharingPassword

The password used to share the workbook. Corresponds to the SharingPassword argument in the ProtectSharing method.

The following code removes sharing from a shared workbook stored in a public location:

    Set wb = Application.Workbooks.Open("\\wombat1\public\shared.xls", , , , "pass1", _
      "pass2")
    wb.UnprotectSharing pass3

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.