Script.Location Property
Gets the location of the script anchor in the specified HTML document. Read-only.
Syntax
Location
expression A variable that represents a Script object.
Remarks
Script tags in an HTML document can appear anywhere between the HTML tags in the document. In Microsoft Office Word, Microsoft Office Excel, or Microsoft Office PowerPoint, only the script anchors located between the BODY tags are visible. Additional HTML script that appears before or after the BODY tags is stored in but is not visible to the user. The Scripts collection contains all of the script anchors that appear in the document, whether inside or outside of the main body of the document. Using theargument of the Addmethod, you can insert script anchors within the HEADand BODYtags in the HTML document. You can also use the Locationproperty to determine where a particular script anchor is stored within the document.
Example
This example checks the Location property of the first script in worksheet one in the active workbook and displays the location in a message box.
| Visual Basic for Applications |
|---|
|
| Location |