AllowInsertingHyperlinks Property

Protection.AllowInsertingHyperlinks Property (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns True if the insertion of hyperlinks is allowed on a protected worksheet. Read-only Boolean.

expression .AllowInsertingHyperlinks

expression A variable that represents a Protection object.

Hyperlinks can only be inserted in unlocked or unprotected cells on a protected worksheet.

The AllowInsertingHyperlinks property can be set by using the Protect method arguments.

This example allows the user to insert a hyperlink in cell A1 on the protected worksheet and notifies the user.

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
Show:
© 2016 Microsoft