XL: How to Use the MultiPage Control in a UserFormLast reviewed: February 4, 1998Article ID: Q155374 |
The information in this article applies to:
SUMMARYThis article explains how to use the MultiPage control in a UserForm and provides a Microsoft Visual Basic for Applications example.
MORE INFORMATIONUse a MultiPage control to work with a large amount of information that can be sorted into several categories. The MultiPage control allows you to visually combine and categorize this information on a single form. The MultiPage control is a container for a collection of Page objects. Each Page object contains its own set of controls and does not necessarily rely on other Page objects for information. For example, you can add different controls in the client region for each Page object in the MultiPage control. By default, a MultiPage control contains two pages; you can add or remove pages as needed.
Adding a MultiPage Control to a UserFormTo add a MultiPage control to a UserForm in the Visual Basic Editor, follow these steps:
Working with the Individual Pages in a MultiPage ControlTo select an individual page in a MultiPage control, first click the MultiPage control, and then click the page. NOTE: When you click the MultiPage control, the page at the front of the control is automatically selected. After you select a page, you can change its properties, delete it, add new pages, or move pages by right-clicking the page and clicking the appropriate command on the shortcut menu.
Working Programmatically with the MultiPage ControlMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.aspUse the SelectedItem property of the MultiPage control to indicate which Page object is selected in the MultiPage control at run time. For example, if you create a MultiPage control named MultiPage1, you can use the following statement to display the caption of the selected page:
MsgBox MultiPage1.SelectedItem.CaptionThe SelectedItem property is read-only and cannot be set at run time. If you need to programmatically set which page is selected, set the Value property for the MultiPage control. The following example selects the third page on MultiPage1:
MultiPage1.Value = 2NOTE: The values of the Pages in a MultiPage control start at zero. Thus, if the control contains three Pages, their values are 0, 1, and 2.
ExampleThe following example describes how to create a simple UserForm that implements a MultiPage control.
REFERENCESFor more information about the MultiPage Control:
|
Additional query words: custom dialog tabbed xl97 XL98
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |