| Part | Description | |
| object | Required. A valid object. | |
| fmCycle | Optional. Specifies whether cycling includes controls nested in a Frame or MultiPage. | |
| Constant | Value | Description | |
| fmCycleAllForms | 0 | Cycles through the controls on the form and the controls of the Frame and MultiPage controls that are currently displayed on the form. | |
| fmCycleCurrentForm | 2 | Cycles through the controls on the form, Frame, or MultiPage. The focus stays within the form, Frame, or MultiPage until the focus is explicitly set to a control outside the form, Frame, or MultiPage. | |
Private Sub RestrictCycles()
'Limit tab order for the Frame and Page objects
Frame1.Cycle = fmCycleCurrentForm
MultiPage1.Page1.Cycle = fmCycleCurrentForm
MultiPage1.Page2.Cycle = fmCycleCurrentForm
End Sub
Private Sub UserForm_Initialize()
RestrictCycles
End Sub
Private Sub CommandButton1_Click()
'Extend tab order subforms (the Frame and Page objects)
Frame1.Cycle = fmCycleAllForms
MultiPage1.Page1.Cycle = fmCycleAllForms
MultiPage1.Page2.Cycle = fmCycleAllForms
End Sub
Private Sub CommandButton2_Click()
RestrictCycles
End Sub