Bewerken

Delen via


_Workbook.ProtectSharing Method

Definition

Saves the workbook and protects it for sharing.

public void ProtectSharing (object Filename, object Password, object WriteResPassword, object ReadOnlyRecommended, object CreateBackup, object SharingPassword);
Public Sub ProtectSharing (Optional Filename As Object, Optional Password As Object, Optional WriteResPassword As Object, Optional ReadOnlyRecommended As Object, Optional CreateBackup As Object, Optional SharingPassword As Object)

Parameters

Filename
Object

Optional Object. A string indicating the name of the saved file. You can include a full path; if you don’t, Microsoft Excel saves the file in the current folder.

Password
Object

Optional Object. A case-sensitive string indicating the protection password to be given to the file. Should be no longer than 15 characters.

WriteResPassword
Object

Optional Object. A string indicating the write-reservation password for this file. If a file is saved with the password and the password isn’t supplied when the file is opened, the file is opened read-only.

ReadOnlyRecommended
Object

Optional Object. True to display a message when the file is opened recommending that the file be opened read-only.

CreateBackup
Object

Optional Object. True to create a backup file.

SharingPassword
Object

Optional Object. A string indicating the password to be used to protect the file for sharing.

Remarks

Use strong passwords that combine upper- and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you don't have to write it down.

Applies to