Remove Method (Page Object Model)

Microsoft FrontPage Visual Basic

Remove Method (Page Object Model)

Removes an object from a collection.

expression.Remove(index)

expression    Required. An expression that returns one of the objects in the Applies To list.

index   Optional Long. specifies the ordinal position of the object in the collection.

Example

The following example removes the first AREA element from the first MAP element in the active document. This example assumes there is at least one MAP element that contains at least one AREA element in the active document.

    Dim objMap As FPHTMLMapElement
Dim objAreas As IHTMLAreasCollection
   
Set objMap = ActiveDocument.all.tags("map").Item(0)
Set objAreas = objMap.areas
   
'Remove the first area
objAreas.Remove 0