Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets a Hyperlinks collection that represents the hyperlinks for the range or worksheet.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property Hyperlinks As Hyperlinks
public Hyperlinks Hyperlinks { get; }
Property Value
Type: Hyperlinks
A Hyperlinks collection that represents the hyperlinks for the range or worksheet.
Examples
The following code example uses the Hyperlinks property to add a hyperlink to the Hyperlinks collection of the worksheet.
This example is for a document-level customization.
Private Sub AddHyperLink()
Dim link As Excel.Hyperlink = _
CType(Me.Hyperlinks.Add(Me.Range("A1"), _
"https://www.microsoft.com", ScreenTip:="Microsoft", _
TextToDisplay:="Microsoft"), Excel.Hyperlink)
End Sub
private void AddHyperLink()
{
Excel.Hyperlink link = (Excel.Hyperlink)this.Hyperlinks.Add(
this.Range["A1"], "https://www.microsoft.com", "Microsoft", "Microsoft");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.