Add combobox to protected form

C

C. T.

I need your help to create a combobox for a protected form. Let me
explain what I want to do and you can tell me if that is the best
approach and direct me to where I can find easy to understand
instructions.

I have created a protected form with many text form fields inserted
into a table to create my online form. Many users will use this form
over a network who have either word 97, or XP.

There are two options. I will use whichever is easier to program.

1. I would like to add a field directly into the form where the user
will select the number and string of text listed together as a
possible selection. For example "1. Improper adjustment based on
prior periods. See system comments before making any future
adjustments"

2. I would like to add a field where the user will enter a number
from 1-15 and second field to right of first field will enter a
"string of text" corresponding to the number entered. For example
"Improper adjustment based on prior periods. See system comments
before making any future adjustments".

There will be up to 15 comments such as this to select from as my
choices in the form. It may be necessary to wrap the comment to next
line because of space.

The string of text was too long for a drop down form field or at least
I could not get it to work. I had considered a listbox but I want the
flexiblity to enter another comment that a combobox would give. I
suspect that the commands would be similar if I find a list box is a
better solution later.

Also, is there anyway to hide the dropdown arrow in the combobox when
the form is printed?

I don't think a userform would be the right choice because I want
users to enter the information directly into the form rather into a
floating userform on top of the printed form.

Thanks for any help you could provide to me.
 
D

Doug Robbins

This old macro should do what you want if you create the text as autotext
entries:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name

'

Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown

Company = myDrop.ListEntries(myDrop.Value).Name

Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value

ActiveDocument.FormFields("Text1").Result = Address


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

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