combo box

G

Gman1959

read the article 'WD2000:How to create combo box with more than 25 items
[Q198561]' which helped tremendously, but I couldn't find anything in the
article that explains how to actually populate the box. Obviously I missed
something. Any help would be appreciated. Using Word 97.
 
D

Doug Robbins

The code in this section of the article is what populates the combo box:

Quote

On the Insert menu, click UserForm. A new UserForm and the Controls
toolbox appear. Right-click the UserForm, and then click View Code. Add the
following code
Private Sub UserForm_Initialize()

ComboBox1.ColumnCount = 1

'Load data into ComboBox

ComboBox1.List() = Array("Zero", "One", "Two", "Three")

End Suband then close the code window.


Unquote

As this work around makes use of a UserForm, you should consider whether or
not that is what you should be using in the first place.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top