Hyperlinks.Add Method

Adds a hyperlink to the specified range or shape. Returns a Hyperlink object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Add ( _
    Anchor As Object, _
    Address As String, _
    SubAddress As Object, _
    ScreenTip As Object, _
    TextToDisplay As Object _
) As Object
'Usage
Dim instance As Hyperlinks
Dim Anchor As Object
Dim Address As String
Dim SubAddress As Object
Dim ScreenTip As Object
Dim TextToDisplay As Object
Dim returnValue As Object

returnValue = instance.Add(Anchor, Address, _
    SubAddress, ScreenTip, TextToDisplay)
Object Add(
    Object Anchor,
    string Address,
    Object SubAddress,
    Object ScreenTip,
    Object TextToDisplay
)

Parameters

  • Address
    Type: System.String

    Required String. The address of the hyperlink.

  • SubAddress
    Type: System.Object

    Optional Object. The subaddress of the hyperlink.

  • ScreenTip
    Type: System.Object

    Optional Object. The screen tip to be displayed when the mouse pointer is paused over the hyperlink.

  • TextToDisplay
    Type: System.Object

    Optional Object. The text to be displayed for the hyperlink.

Return Value

Type: System.Object

Remarks

When you specify the TextToDisplay argument, the text must be a string.

See Also

Reference

Hyperlinks Interface

Hyperlinks Members

Microsoft.Office.Interop.Excel Namespace