ComboBox Problem

S

Simon

Hi

I currently design a Word letter template for our
Administration Department.

It contains a UserForm which pops up when you open the
DOT file. The UserForm has several fields which you can
complete and as soon as you hit the okay button all the
content is populated into the document (Linked with
bookmarks).

On of the fields in the UserForm is a ComboBox where I
would like to select a person. This works and I can
select the person, but when I select another person the
list doubles the content and if I select another person
again the list triples.

Can you see any mistake in my code?

-------------------------------------------------
Private Sub ComboBox1_DropButtonClick()
Dim Von, Mitarbeiter
Mitarbeiter = Array("A", "B", "C", "D")
For Each Von In Mitarbeiter
ComboBox1.AddItem Von
Next
ComboBox1.ListRows = 0
End Sub
 
J

Jezebel

The mistake is that you're populating the list each time you click the
combo. You should populate the list, once, when you load the form.
 
S

Simon

How do I achievement that?
-----Original Message-----
The mistake is that you're populating the list each time you click the
combo. You should populate the list, once, when you load the form.





.
 

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