Link to home
Start Free TrialLog in
Avatar of chuckalicious
chuckaliciousFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Getting combobox to display values in a form in Word 2003

Ok, this one should be simple, I know, but I just cannot figure it out.

I have a form in Word 2003 which has a couple of combo boxes on it. I want these combo boxes to have a list of values for the user to select from. This list is static and doesn't need to be pulled from elsewhere.

How on earth do I get the list of values into the combo box?

One is called "DocType" and the other "Category". I have tried code like this:

With Me.Category
        .AddItem ("Bible")
etc

and it doesn't work, no error, just no values.

If I can get this working I'll be very happy :)

Thanks
Avatar of Flyster
Flyster
Flag of United States of America image

Does it have to be through VBA? If you right-click your combo box and select properties, you'll get the Drop-Down Form Field Options dialog box. Enter your item in the Drop-Down item box and select "Add". This will add it to your combo box.

Flyster
Avatar of chuckalicious

ASKER

I do not get any "Add" option.

To make sure we're on the right track here, I have a macro in Word 2003 which uses a form, also created via the MS VB editor in Word. When I right click on the ComboBox, I get a long list of properties/options, but none which give any kind of Add option....

And no, it doesn't need to be done programatically, I just want the values in the fields :)
ASKER CERTIFIED SOLUTION
Avatar of Flyster
Flyster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See!! I knew it was something simple!!

I was using this same code, however I had it in the initialise of the form, instead of the enter event of the dropdown!

Works perfectly, thank you :)