View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default how do I enter a list in a list box or a combo box

On 31/05/2010 11:42 AM, word challenged wrote:
hi i am trying to enter a list of names into either a list box or a combo box
but i can not find out how to do it... can anybody help please...

See the following page of Greg Maxey's website:

http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm

If it's an ActiveX combobox that you haved inserted directly into the
document, right click on it and select View Code and use code such as

Private Sub ComboBox1_GotFocus()
With ComboBox1
.Clear
.AddItem "myfirstitem"
.AddItem "myseconditem"
'etc
.AddItem "mylastitem
End WIth
End Sub

If it is a Content Control, select it and click on the Properties button
in the Developer tab of the Ribbon and you can add the items into the
Content Control Properties dialog that appears.
--
Hope this helps,
Doug Robbins - Word MVP
Please reply to the newsgroup unless you want to obtain my services on a
professional basis.