Hi Guys,
I would love some help here if you can.
I have a Userform that has a Textbox1 and a Combobox1, with a command button. The Combo Box drop down has a list of items and gets the data from a sheet somewhere else in the workbook.
What I'd like to happen is if the user selects the PERSONAL EFFECTS option from the combo box drop down list and clicks the command button, then Textbox1 on the same Userform gets filled in with text that says "Personal Effects (cover 20% of Contents Sum Insured)"
Here is my code. But when I click on the command button nothing happens on TextBox1. I'm new to VBA so forgive me if this is a silly post.
Private Sub CommandButton1_Click()
If Me.ComboBox1.Value = "PERSONAL EFFECTS" Then
Me.TextBox1.Value = "Personal Effects (cover 20% of Contents Sum Insured)"
End If
End Sub
I would love some help here if you can.
I have a Userform that has a Textbox1 and a Combobox1, with a command button. The Combo Box drop down has a list of items and gets the data from a sheet somewhere else in the workbook.
What I'd like to happen is if the user selects the PERSONAL EFFECTS option from the combo box drop down list and clicks the command button, then Textbox1 on the same Userform gets filled in with text that says "Personal Effects (cover 20% of Contents Sum Insured)"
Here is my code. But when I click on the command button nothing happens on TextBox1. I'm new to VBA so forgive me if this is a silly post.
Private Sub CommandButton1_Click()
If Me.ComboBox1.Value = "PERSONAL EFFECTS" Then
Me.TextBox1.Value = "Personal Effects (cover 20% of Contents Sum Insured)"
End If
End Sub