Share via


Remove Method (Pages Collection)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

                 

The Remove method removes a Page object from the Pages collection of a tab control.

Syntax

object**.Remove** [item]

The Remove method has the following arguments.

Argument Description
object A string expression that evaluates to the Pages collection of a tab control.
item An integer that specifies the index of the Page object to be removed. The index of the Page object corresponds to the value of the property for that Page object. If you omit this argument, the last Page object in the collection is removed.

Remarks

The Pages collection is indexed beginning with zero. The leftmost page in the tab control has an index of 0, the page immediately to the right of the leftmost page has an index of 1, and so on.

You can remove a Page object from the Pages collection of a tab control only when the form is in Design view.