Word Form Help

R

randrob

making a word for drop down needed nore then 25 entries

i have succesfully added the VBA to do this

now the issue i have is this

here is the code to fill the drop down bok for a form

Private Sub UserForm_Initialize()

ComboBox1.ColumnCount = 1

'Load data into ComboBox

ComboBox1.List() = Array("FCI-Allenwood", "FCI-Loretto",
"FCI-McKean", "Chick Buckbee Juv Center")

End Sub


as i enter felds into the = array area
it gets to the point that it will not let me type in any more data (in
the sample code above i have 4 when done there wil be about 125)

what i need to know is how to make the array info continue on the next
line

hope i explained this correctly

thanks for any help
 
R

randrob

no i have everything working all i need to know how to do is get it to
continue letting me add on the next line

in other words i have in the example again 4 institutions entered
when i do this i will need to add over 100 as i add these
i come to a point where it wont let me type any more in
so i need them to continue on the next line below

when i try to do this it tells me i am missing something
if i simply hit enter and try to continue so are there some symbols or
such i need to add in
 
G

Gordon Bentley-Mix

The following might help:

Private Sub InitialiseComboBox1()
Dim myArray As String
myArray = Split("Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|Item 7|" _
& "Item 9|Item 10|Item 11|Item 12|Item 13|Item 14|Item 15|Item 16|" _
& "Item 17|Item 18|Item 19|Item 20|Item 21|Item 22|Item 23|Item 24|" _
& "Item 25|Item 26|Item 27|Item 28|Item 29|Item 30", "|")
ComboBox1.List = myArray
End Sub

I can continue doing this for as many items as I could possible want to add
to the array.

BTW, if you try to copy this code into your project, watch the line breaks
that the newsgroup editor inserts.

You might also find http://en.wikipedia.org/wiki/Punctuation useful for
future posts.
-----
Cheers!

Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
D

Doug Robbins - Word MVP

Use Space Underscore then Enter to create a new line in your code

This is the first line of code _
This is a continuation of the first line of code

--
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