Combo Box

O

Owen

Hello

I have a Microsoft Word 2003 Template Form which contains numerous Combo
Boxes. The form is for a daily report we issue to clients.

When the user creates a new document from the template, all the items are
available within the Combo Box Listing. The user completes the form and saves
the document.

We then wish to be able to copy the completed form and amend it on a daily
basis. The problem we are having, is that the items listed within the Combo
Box dissappear when we copy the previous word document.

Is there something i can enter within my VBA code to keep the combo boxes
populated with the previous selections?

Thanks for any help you can provide.
 
D

Doug Robbins - Word MVP

What type of form it this - A custom dialog (user form) or a document that
is protected for filling in forms.

--
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, originally posted via msnews.microsoft.com
 
S

Suzanne S. Barnhill

In that case what you have is a dropdown list form field rather than a combo
box, but the list items should remain available unless you are saving data
only. OTOH, if there is VBA code involved, then this is more than a
protected form.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
O

Owen

Hi Suzanne

Yes, there is VBA Code within my document template. The lists are definetely
Combo Boxes. I couldn't use a List Box as they were limited to 20 items i
think, whereas my Combo Box has over 200 items.

Any thoughts on why the Combo Box contents is not saving following multiple
saves to document format from the original .dot format?

Thanks again
 
S

Suzanne S. Barnhill

You say the document is protected. Is it protected for forms or some other
kind of protection? ActiveX controls and forms protection are not
compatible.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
D

Doug Robbins - Word MVP

Show us the code that you are using the populate the combobox in the first
case.

--
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, originally posted via msnews.microsoft.com
 
O

Owen

Hi Doug/Suzanne

The form is protected using Microsoft Word 2003 "Tools/Protect Document" on
the main menu. The code used to populate the combo box with numerous items is:

Private Sub Document_New()
With ComboBox1
..AddItem "Sample Text"
End With
End Sub

When a document is first opened from the template, all the list items are
available.

I save the document (.doc) that the user completes using "Save As" to
another .doc file. ie i want to now use the completed form as a basis for the
next report. At this stage however, the new document loses all the
information in the combo box list.

Thanks again
 
D

Doug Robbins - Word MVP

You should save the document as a Template and then use File>New and select
the template when you want to create a new document.

--
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, originally posted via msnews.microsoft.com
 

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