共用方式為


Protection.AllowInsertingHyperlinks 屬性 (Excel)

如果允許使用者在受保護工作表上插入超連結,則會傳回 True。 唯讀的 Boolean

語法

運算式AllowInsertingHyperlinks

表達 代表 Protection 物件的變數。

註解

在受保護工作表上,您只能將超連結插入未鎖定或未保護的儲存格。

AllowInsertingHyperlinks屬性可以使用Protect方法引數來設定。

範例

本範例允許使用者在受保護工作表上的儲存格 A1 中插入超連結,並通知使用者。

Sub ProtectionOptions() 
 
 ActiveSheet.Unprotect 
 
 ' Unlock cell A1. 
 Range("A1").Locked = False 
 
 ' Allow hyperlinks to be inserted on a protected worksheet. 
 If ActiveSheet.Protection.AllowInsertingHyperlinks = False Then 
 ActiveSheet.Protect AllowInsertingHyperlinks:=True 
 End If 
 
 MsgBox "Hyperlinks can be inserted on this protected worksheet." 
 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應