How to populate a combo box

M

mike

I am new to vb programming. I have a template (WD2000)
that I have created in word with a combo box that will be
populated with addresses. I have two questions:

1. I need assistance with the code to populate the combo
box.

2. These addresses are multiple line...is there an easy
way to do this?

i.e. Baltimore.Text = Blaine Industries
12 Hartford Way
Baltimore, MD 00000


Thanks for your help!
 
D

DA

Hi Mike

To find out how to populate combo box fields, have a read
of the info found here:
http://word.mvps.org/FAQs/Userforms/LoadListBoxIntoArray.h
tm

As to your multi-line addresses, you can either split up
each line into fields in an array, or if you want to keep
them as one single string, you could use in-line carriage
return line-feeds. For example

Dim strAddress as String
strAddress = "Blaine Industries" + vbCrLf + _
"12 Hartford Way" + vbCrLf + _
"Baltimore, MD 00000"


Hope that helps,
Dennis
 

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