會保護圖表,使其無法進行修改。
語法
表達。保護 (密碼、DrawingObjects、Contents、Scenarios、UserInterfaceOnly)
expression 代表 Chart 物件的變數。
參數
| 名稱 | 必要/選用 | 資料類型 | 描述 |
|---|---|---|---|
| Password | 選用 | Variant | 字串,用於指定工作表或活頁簿的密碼,該密碼區分大小寫。 如果省略這個引數,則不需使用密碼就可以取消對該工作表或活頁簿的保護。 否則,必須指定密碼,才能取消對該工作表或活頁簿的保護。 如果忘記密碼,就無法取消對該工作表或活頁簿的保護。 Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. 強密碼: Y6dh!et5。 弱密碼: House27。 Passwords should be 8 or more characters in length. A pass phrase that uses 14 or more characters is better. 記住密碼至關重要。 If you forget your password, Microsoft cannot retrieve it. Store the passwords that you write down in a secure place away from the information that they help protect. |
| 繪圖物件 | 選用 | Variant | 如果為 True,則會保護圖案。 預設值為 True。 |
| Contents | 選用 | Variant | 如果為 True,則會保護內容。 如果是圖表,這樣可保護整張圖表。 如果是工作表,這樣可保護鎖定的儲存格。 預設值為 True。 |
| Scenarios | 選用 | Variant | 如果為 True,則會保護分析藍本。 這個引數只適用於工作表。 預設值為 True。 |
| 僅限使用者介面 | 選用 | Variant | 如果為 True,則會保護使用者介面,但不會保護巨集。 如果省略這個引數,則會同時保護巨集和使用者介面。 |
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。