I created a userform with 10 comboboxes and labels
I have tried saving the results onto another spreadsheet "Code" but only the first two comboboxes save and the second one only changes when the first box is empty.
The code i am using is below
Private Sub CommandButton1_Click()
With Worksheets("Code")
.Cells(3, 2).Value = UserForm1.ComboBox11.Value
.Cells(4, 2).Value = UserForm1.ComboBox12.Value
.Cells(5, 2).Value = UserForm1.ComboBox13.Value
.Cells(6, 2).Value = UserForm1.ComboBox14.Value
.Cells(7, 2).Value = UserForm1.ComboBox15.Value
.Cells(8, 2).Value = UserForm1.ComboBox16.Value
.Cells(9, 2).Value = UserForm1.ComboBox17.Value
.Cells(10, 2).Value = UserForm1.ComboBox18.Value
.Cells(11, 2).Value = UserForm1.ComboBox19.Value
.Cells(12, 2).Value = UserForm1.ComboBox20.Value
End With
End Sub
I have tried saving the results onto another spreadsheet "Code" but only the first two comboboxes save and the second one only changes when the first box is empty.
The code i am using is below
Private Sub CommandButton1_Click()
With Worksheets("Code")
.Cells(3, 2).Value = UserForm1.ComboBox11.Value
.Cells(4, 2).Value = UserForm1.ComboBox12.Value
.Cells(5, 2).Value = UserForm1.ComboBox13.Value
.Cells(6, 2).Value = UserForm1.ComboBox14.Value
.Cells(7, 2).Value = UserForm1.ComboBox15.Value
.Cells(8, 2).Value = UserForm1.ComboBox16.Value
.Cells(9, 2).Value = UserForm1.ComboBox17.Value
.Cells(10, 2).Value = UserForm1.ComboBox18.Value
.Cells(11, 2).Value = UserForm1.ComboBox19.Value
.Cells(12, 2).Value = UserForm1.ComboBox20.Value
End With
End Sub