Version

WorksheetHyperlink Constructor(WorksheetCell,Object,String,String)

Creates a new WorksheetHyperlink instance.
Syntax
'Declaration
 
Public Function New( _
   ByVal sourceCell As WorksheetCell, _
   ByVal target As Object, _
   Optional ByVal displayText As String, _
   Optional ByVal toolTip As String _
)
public WorksheetHyperlink( 
   WorksheetCell sourceCell,
   object target,
   string displayText,
   string toolTip
)

Parameters

sourceCell
The cell on which the hyperlink should reside.
target
The target of the hyperlink, which can be a string, WorksheetCell, WorksheetRegion, or NamedReference instance. For bookmarks in an external document, separate the sub-address with a #, such as "File.xlsx#Sheet1!C3". For email addresses, use a target string with the format "mailto:joe@company.com" or "mailto:joe@company.com?subject=Email%20Subject".
displayText
The text to display in the cell when the hyperlink is added to a worksheet, or null to use the target text.
toolTip
The text to use in a tool tip when hovering over the source cell or region, or null to use the default tool tip.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when sourceCell is null.
System.ArgumentExceptionOccurs when target is not a string, WorksheetCell, WorksheetRegion, or NamedReference instance.
System.ArgumentExceptionOccurs when target is a string longer than 256 characters.
System.ArgumentExceptionOccurs when target is a cell, region, or named reference which is not from the same workbook as sourceCell.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also