Reputation: 239
Need to create a checkbox inside a dropdown in excel 2010. Have already tried creating a list box and selected the multiselectExtended option but that is not serving our purpose.
Sample of the required functionality attached:
Upvotes: 3
Views: 28997
Reputation: 362
Solved!
Check this link for the solution.
You can add an active form list box on the sheet and have the multi-select enabled.
Let me know your thoughts.
Upvotes: 6
Reputation: 4972
I think the only way to do this is to create a custom dialog. I hope the following is clear enough to do so.
Add the dialog:
Add a list box:
Add the data to a sheet and reference it in the List Box:
Add a button to the sheet:
Add a module in VBA and add the following code:
Public diag As Object 'the dialog box
'this code is assigned to the button on the sheet
Sub Button3_Click()
Set diag = DialogSheets("Dialog1") 'define the dialog box
diag.Show 'sow the dialog box
End Sub
'to be assigned to the "OK" button in the dialog
Sub Button2_Click()
' finds selected items
Dim Msg As String, i As Integer
Msg = ""
With diag.ListBoxes("List Box 5")
For i = 1 To .ListCount
If .Selected(i) Then
Msg = Msg & .List(i) & ";"
End If
Next i
End With
'set the cell the values as needed
Worksheets("Sheet1").Range("A1") = Msg
End Sub
Upvotes: 3