how to specify the Row Source of a combo box

P

Paul James

I'm trying to create a combo box in a form in Word 2002, but I can't figure
out how to specify the data contents in the Row Source property of the combo
box.

I tried using online help in Word, but it only talks about referring to the
cell address of the range of data as if I were building a combo box in
Excel. If I were in Excel or Access, I'd know how to do this. But how do
you specify a Row Source for a combo box in Word? That is, where do you put
the data, and how do you refer to it in the Row Source property box?

Thanks in advance.

Paul
 
J

Jezebel

As far as I know, in Word the RowSource property is useful only for clearing
the combo's list (ie, by setting RowSource = ""). To put data into the
Combo, use the AddItem method.
 
C

Cindy M -WordMVP-

Hi Paul,
I'm trying to create a combo box in a form in Word 2002, but I can't figure
out how to specify the data contents in the Row Source property of the combo
box.
Besides AddItem, you can also assign an Array to the List() property. Take a
look this example in the Help

ListBox Control, Column, ColumnCount, List Properties Example

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

Paul James

Good suggestion. Thanks, Cindy.

A question - in following the help paths you suggested (ListBox Control,
Column, ColumnCount, List Properties Example) I see that you can populate a
List box control using an array variable, and that section in help provides
an example showing how to do it. Do you know if you can also do this for a
combo box? That is, use an array along with a method like
"combobox1.list( ) = myArray" to provide the data source of the combo box?

I tried looking that up in help, but I couldn't find any information about
using an array to populate the data source of a combo box.

Thanks again in advance.

Paul
 
J

Jezebel

Comboboxes and Listboxes are pretty well identical for most purposes, apart
from the combo's editing methods and events.
 

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