| Part | Description | |
| object | Required. A valid object. | |
| fmStyle | Optional. Specifies how a user sets the value of a ComboBox. | |
| fmTabStyle | Optional. Specifies the tab style in a MultiPage or TabStrip. | |
| Constant | Value | Description | |
| fmStyleDropDownCombo | 0 | The ComboBox behaves as a drop-down combo box. The user can type a value in the edit region or select a value from the drop-down list (default). | |
| fmStyleDropDownList | 2 | The ComboBox behaves as a list box. The user must choose a value from the list. | |
| Constant | Value | Description | |
| fmTabStyleTabs | 0 | Displays tabs on the tab bar (default). | |
| fmTabStyleButtons | 1 | Displays buttons on the tab bar. | |
| fmTabStyleNone | 2 | Does not display the tab bar. | |
Private Sub OptionButton1_Click()
ComboBox1.Style = fmStyleDropDownCombo
End Sub
Private Sub OptionButton2_Click()
ComboBox1.Style = fmStyleDropDownList
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer
For i = 1 To 10
ComboBox1.AddItem "Choice " & i
Next i
OptionButton1.Caption = "Select like ComboBox"
OptionButton1.Value = True
ComboBox1.Style = fmStyleDropDownCombo
OptionButton2.Caption = "Select like ListBox"
End Sub
Private Sub OptionButton1_Click()
MultiPage1.Style = fmTabStyleTabs
TabStrip1.Style = fmTabStyleTabs
End Sub
Private Sub OptionButton2_Click()
'Note that the page borders are invisible
MultiPage1.Style = fmTabStyleButtons
TabStrip1.Style = fmTabStyleButtons
End Sub
Private Sub OptionButton3_Click()
'Note that the page borders are invisible and
'the page body begins where the tabs normally appear.
MultiPage1.Style = fmTabStyleNone
TabStrip1.Style = fmTabStyleNone
End Sub
Private Sub UserForm_Initialize()
Label1.Caption = "Page/Tab Style"
OptionButton1.Caption = "Tabs"
OptionButton1.Value = True
MultiPage1.Style = fmTabStyleTabs
TabStrip1.Style = fmTabStyleTabs
OptionButton2.Caption = "Buttons"
OptionButton3.Caption = "No Tabs or Buttons"
End Sub