Protection.AllowFormattingCells 屬性 (Excel)
如果允許使用者在受保護工作表上設定儲存格的格式,則會傳回 True。 唯讀的 Boolean。
語法
運算式。AllowFormattingCells
表達 代表 Protection 物件的變數。
註解
AllowFormattingCells屬性可以使用Protect方法引數來設定。
使用此屬性會停用保護索引標籤,讓使用者可以變更所有格式,但無法解除鎖定或取消隱藏範圍。
範例
本範例允許使用者在受保護工作表上設定儲存格的格式,並通知使用者。
Sub ProtectionOptions()
ActiveSheet.Unprotect
' Allow cells to be formatted on a protected worksheet.
If ActiveSheet.Protection.AllowFormattingCells = False Then
ActiveSheet.Protect AllowFormattingCells:=True
End If
MsgBox "Cells can be formatted on this protected worksheet."
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。