Multiple List with Check Boxes

Copper Contributor

Would like to add a list with check boxes to a table in word.  Users should be able to select more than one item from the List.  Is this possible?

 

6 Replies

@Jay_Cous To do it actually in the document, you would need to use an ActiveX ListBox that can be inserted via the Legacy Forms in the Controls section of the Developer tab of the ribbon.

Doug_Robbins_Word_MVP_1-1651717472927.png

with its ListStyle property set to 1 - frmListStyleOption and the MultiSelect property set to frmMultiSelectMulti.

Doug_Robbins_Word_MVP_0-1651717332654.png

 

However, depending upon what you want to do with the selected items, using an ActiveX checkbox will probably not be satisfactory and it will almost certainly be better to make use of a UserForm.

@Doug_Robbins_Word_MVP 

 

Hello Doug.  Thanks for sending me that info.  Think it will work.  Could change the properties as per your screen shot however, I end up with a blank box.  How do I put Items in that box?  Thanks.

How did you get Item 3, 4, 5, etc to appear in the box?

@Jay_Cous Save the document as a Macro Enabled Template (*.dotm) and in the ThisDocument object, set up the following code

 

Private Sub Document_New()
Dim i As Long
With ListBox1
     .Clear
     For i = 1 To 10
          .AddItem "Item " & i
     Next i
End With
End Sub

Hello Doug. Am not an expert user of word. Are you able to provide all the steps on how to do this. For instance, Have created the Active X, then created the above script as above and my box is still empty and am unable to create a list of options in it. When creating the above, went into Visual Basic > Project > Microsoft Word Objects > ThisDocument and pasted what you suggested. But all I got was a blank box.
Did you save the file as a Macro Enabled Template (*.dotm) and then after closing that file, use File>New and select that Template to create a new document from it. When you do that, any macro with the name of Document_New will run.

If you cannot get it to work, upload a copy of the document so that we can check it.