Open the Correct Word VBA UserForm from a Combo Box
Question details
Configure a Word VBA combo box to display contract types and open the UserForm that matches the selected value.

- Product
- Microsoft Word VBA
- Device & OS
- not provided
- Scenario
- A start UserForm lets the user select a contract type and open its corresponding form.
- Observed behavior
- The combo box may be empty, or selecting any contract type may open the wrong UserForm.
Open the macro-enabled Word document and make sure macros are enabled for this trusted file. In the VBA editor, check the actual (Name) properties of the combo box, button, and destination UserForms.
Populate the combo box and route each selection to its matching UserForm
Use this approach when the list is empty or the button opens the wrong form.
The example uses ComboBox1, CommandButton1, FullTimeForm, PartTimeForm, and CasualForm as names. Replace them with the actual (Name) properties in your VBA project, and keep the option text identical in both procedures.
In Word, open Developer > Visual Basic. In the Project Explorer, find the start UserForm, right-click it, and select View Code.
Add this procedure to the start form's code module: Private Sub UserForm_Initialize() With Me.ComboBox1 .Clear .AddItem "Full Time" .AddItem "Part Time" .AddItem "Casual" End With End Sub
In the same code module, add this button procedure, substituting your actual button and form names: Private Sub CommandButton1_Click() Select Case Me.ComboBox1.Value Case "Full Time" Me.Hide FullTimeForm.Show Case "Part Time" Me.Hide PartTimeForm.Show Case "Casual" Me.Hide CasualForm.Show Case Else MsgBox "Select a contract type from the list." End Select End Sub
Save the document as a Word Macro-Enabled Document (.docm), then open the start form using your existing macro. Select each contract type and click the button to verify that the correct form opens.

Work with Word documents in WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its format support helps with migration, but it does not fix Word's VBA code; macro and UserForm support can vary by version and configuration.

Frequently Asked Questions
Why is my Word UserForm combo box empty?
The list may not be populated when the form starts. In the start form's code module, add the options in UserForm_Initialize using ComboBox1.AddItem, with the actual combo box name.
Why does every selection open the Casual form?
Check the button's Click procedure for an unconditional CasualForm.Show call or incorrect conditions. Use Select Case on the combo box's Value and place each form's Show call under the matching option.
How do I find the actual names of my controls and forms?
In Developer > Visual Basic, select the control or UserForm and inspect its (Name) property in the Properties window. Use those names in the VBA procedures, not necessarily the captions displayed on the form.
What if the correct form opens but its button does nothing?
Open the destination UserForm's code module in the VBA editor and check for the button's Click event procedure. If the form was copied, its event code may not have been copied with it.




