Multiple List with Check Boxes

%3CLINGO-SUB%20id%3D%22lingo-sub-3302007%22%20slang%3D%22en-US%22%3EMultiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3302007%22%20slang%3D%22en-US%22%3E%3CP%3EWould%20like%20to%20add%20a%20list%20with%20check%20boxes%20to%20a%20table%20in%20word.%26nbsp%3B%20Users%20should%20be%20able%20to%20select%20more%20than%20one%20item%20from%20the%20List.%26nbsp%3B%20Is%20this%20possible%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3318820%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3318820%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1380416%22%20target%3D%22_blank%22%3E%40Jay_Cous%3C%2FA%3E%26nbsp%3BTo%20do%20it%20actually%20in%20the%20document%2C%20you%20would%20need%20to%20use%20an%20ActiveX%20ListBox%20that%20can%20be%20inserted%20via%20the%20Legacy%20Forms%20in%20the%20Controls%20section%20of%20the%20Developer%20tab%20of%20the%20ribbon.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Doug_Robbins_Word_MVP_1-1651717472927.png%22%20style%3D%22width%3A%20341px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369347i3A2A82A50C891C28%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Doug_Robbins_Word_MVP_1-1651717472927.png%22%20alt%3D%22Doug_Robbins_Word_MVP_1-1651717472927.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ewith%20its%20ListStyle%20property%20set%20to%201%20-%20frmListStyleOption%20and%20the%20MultiSelect%20property%20set%20to%20frmMultiSelectMulti.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Doug_Robbins_Word_MVP_0-1651717332654.png%22%20style%3D%22width%3A%20671px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369346i311305A9662D0505%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Doug_Robbins_Word_MVP_0-1651717332654.png%22%20alt%3D%22Doug_Robbins_Word_MVP_0-1651717332654.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20depending%20upon%20what%20you%20want%20to%20do%20with%20the%20selected%20items%2C%20using%20an%20ActiveX%20checkbox%20will%20probably%20not%20be%20satisfactory%20and%20it%20will%20almost%20certainly%20be%20better%20to%20make%20use%20of%20a%20UserForm.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3318912%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3318912%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1225189%22%20target%3D%22_blank%22%3E%40Doug_Robbins_Word_MVP%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Doug.%26nbsp%3B%20Thanks%20for%20sending%20me%20that%20info.%26nbsp%3B%20Think%20it%20will%20work.%26nbsp%3B%20Could%20change%20the%20properties%20as%20per%20your%20screen%20shot%20however%2C%20I%20end%20up%20with%20a%20blank%20box.%26nbsp%3B%20How%20do%20I%20put%20Items%20in%20that%20box%3F%26nbsp%3B%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3318956%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3318956%22%20slang%3D%22en-US%22%3EHow%20did%20you%20get%20Item%203%2C%204%2C%205%2C%20etc%20to%20appear%20in%20the%20box%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3323895%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3323895%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1380416%22%20target%3D%22_blank%22%3E%40Jay_Cous%3C%2FA%3E%26nbsp%3BSave%20the%20document%20as%20a%20Macro%20Enabled%20Template%20(*.dotm)%20and%20in%20the%20ThisDocument%20object%2C%20set%20up%20the%20following%20code%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPrivate%20Sub%20Document_New()%3CBR%20%2F%3EDim%20i%20As%20Long%3CBR%20%2F%3EWith%20ListBox1%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B.Clear%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BFor%20i%20%3D%201%20To%2010%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20.AddItem%20%22Item%20%22%20%26amp%3B%20i%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BNext%20i%3CBR%20%2F%3EEnd%20With%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3328075%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3328075%22%20slang%3D%22en-US%22%3EHello%20Doug.%20Am%20not%20an%20expert%20user%20of%20word.%20Are%20you%20able%20to%20provide%20all%20the%20steps%20on%20how%20to%20do%20this.%20For%20instance%2C%20Have%20created%20the%20Active%20X%2C%20then%20created%20the%20above%20script%20as%20above%20and%20my%20box%20is%20still%20empty%20and%20am%20unable%20to%20create%20a%20list%20of%20options%20in%20it.%20When%20creating%20the%20above%2C%20went%20into%20Visual%20Basic%20%26gt%3B%20Project%20%26gt%3B%20Microsoft%20Word%20Objects%20%26gt%3B%20ThisDocument%20and%20pasted%20what%20you%20suggested.%20But%20all%20I%20got%20was%20a%20blank%20box.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3328947%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20List%20with%20Check%20Boxes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3328947%22%20slang%3D%22en-US%22%3EDid%20you%20save%20the%20file%20as%20a%20Macro%20Enabled%20Template%20(*.dotm)%20and%20then%20after%20closing%20that%20file%2C%20use%20File%26gt%3BNew%20and%20select%20that%20Template%20to%20create%20a%20new%20document%20from%20it.%20When%20you%20do%20that%2C%20any%20macro%20with%20the%20name%20of%20Document_New%20will%20run.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20cannot%20get%20it%20to%20work%2C%20upload%20a%20copy%20of%20the%20document%20so%20that%20we%20can%20check%20it.%3C%2FLINGO-BODY%3E
New 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.