Share via


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 Pages collection contains all Page objects in a tab control.

Remarks

The Pages collection is a special kind of Controls collection belonging to the tab control. It contains Page objects, which are controls. The Pages collection differs from a typical Controls collection in that you can add and remove Page objects by using methods of the Pages collection.

To add a new Page object to the Pages collection from Visual Basic, use the Add method of the Pages collection. To remove an existing Page object, use the Remove method of the Pages collection. To count the number of Page objects in the Pages collection, use the property of the Pages collection.

You can also use the method to add a Page object to the Pages collection of a tab control. To do this, you must specify the name of the tab control for the parent argument of the CreateControl function. The property constant for a Page object is acPage.

You can enumerate through the Pages collection by using the statement.

Individual Page objects in the Pages collection are indexed beginning with zero.