C
combo box question
Hi,
I have 6 combo boxes on a spreadsheet. I would like the user to be able to
pick up to 15 items from any of these combo boxes and store the information
in a separate column on the worksheet. I was able to code one combo box to
get the data into a column, but when I copy this code to another combo box
and select a value, the selected value starts at the top of the column, when
I would like it to start in the next available empty cell in the column.
Below is the code I am using in one combo box:
Private Sub ListBox_StateReg_dblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Integer, icount As Integer
For i = 0 To ListBox_StateReg.ListCount - 1
If ListBox_StateReg.Selected(i) Then
icount = icount + 1
Cells(icount, 16) = ListBox_StateReg.list(i)
End If
Next i
End Sub
Any help would be greatly appreciated
I have 6 combo boxes on a spreadsheet. I would like the user to be able to
pick up to 15 items from any of these combo boxes and store the information
in a separate column on the worksheet. I was able to code one combo box to
get the data into a column, but when I copy this code to another combo box
and select a value, the selected value starts at the top of the column, when
I would like it to start in the next available empty cell in the column.
Below is the code I am using in one combo box:
Private Sub ListBox_StateReg_dblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Integer, icount As Integer
For i = 0 To ListBox_StateReg.ListCount - 1
If ListBox_StateReg.Selected(i) Then
icount = icount + 1
Cells(icount, 16) = ListBox_StateReg.list(i)
End If
Next i
End Sub
Any help would be greatly appreciated