This documentation is archived and is not being maintained.

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)

'Usage
Dim Anchor As Object
Dim Address As String
Dim SubAddress As Object
Dim ScreenTip As Object
Dim TextToDisplay As Object
Dim returnValue As Object
Dim hyperlinks1 As Hyperlinks
returnValue = hyperlinks1.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)

object Add(
	[In] object Anchor, 
	[In] string Address, 
	[In, Optional] object SubAddress, 
	[In, Optional] object ScreenTip, 
	[In, Optional] object TextToDisplay
);
public System.Object Add(
	/*in*/System.Object Anchor, 
	/*in*/System.String Address, 
	/*in*/System.Object SubAddress, 
	/*in*/System.Object ScreenTip, 
	/*in*/System.Object TextToDisplay
);
function Add(
	 Anchor : Object, 
	 Address : String, 
	 SubAddress : Object, 
	 ScreenTip : Object, 
	 TextToDisplay : Object
) : Object;

Parameters

Anchor

Required Object. The anchor for the hyperlink. Can be either a Range or Shape object.

Address

Required String. The address of the hyperlink.

SubAddress

Optional Object. The subaddress of the hyperlink.

ScreenTip

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

TextToDisplay

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

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


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Show: