Export (0) Print
Expand All
Expand Minimize

Range.ID Property

Office 2007
Returns or sets a String value that represents the identifying label for the specified cell when the page is saved as a Web page.

Syntax

expression.ID

expression   A variable that represents a Range object.

Remarks

You can use an ID label as a hyperlink reference in other HTML documents or on the same Web page.

Example

This example sets the ID of cell A1 on the active worksheet to "target".

Visual Basic for Applications
ActiveSheet.Range("A1").ID = "target"

Later, the document is saved as a Web page, and the following line of HTML is added to the Web page. When the user then views the page in a Web browser and clicks the hyperlink, the browser displays the cell.

Visual Basic for Applications
<A HREF="#target">Quarterly earnings</A>



Community Additions

ADD
Show:
© 2014 Microsoft