


Word MVP Doug Robbins has posted this method regularly in the Microsoft Word Public newsgroups.Įxample 1 - The following series of illustrations show: The first method uses a Microsoft Word table contained in a separate document as the external source. Next we will look at some methods for using an external data source to populate a listbox. Note columns are indexed _Įach of the previous examples used data contained in the userform Initialize event to create the listbox list members. 'Write userform data to bookmarked ranges in the document. List method to write array data to specific listbox row and column.

AddItem method to add a multi-column row for each array element. ColumnWidth property to set column widths. & "Arkansas|California|Connecticut|Etc.", "|")ĪrrStateAbbv = Split(" |AL|AK|AZ|AR|CA|CT|Etc", "|") 'Use the Split function to create two zero based one dimensional arrays.ĪrrStateName = Split("Select State|Alabama|Alaska|Arizona|" _ A combobox can be configured to accept pre-defined list entries only or allow the user to enter his or her own text. You can download the demonstration document containing all of the example userforms and VBA procedures used to prepare this tips page with the link at the end of the page.Ī listbox provides users with a convenient means of selecting one or more items from a fixed pre-defined list.Ī combobox provides users with a compact and convenient means of selecting a single item from a pre-defined list. For brevity, I will use one term or the other in the examples that follow.ģ. The basic process for populating a listbox or combobox is the same. See my Create & Employ a Userform tips page for information on creating and employing userforms.Ģ.

Microsoft Word MVP Doug Robbins has kindly assisted with the preparation of this page. This Microsoft Word Tips & Microsoft Word Help page demonstrates several methods that you can use to populate a userform listbox (or combobox).
