Applies To Pages collection.
Description
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 PageIndex 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.See Also Add method (Pages collection).
Example See the Add method (Pages collection) example.