Hello,
I've created a combo box in word, but now everytime I open it, I have to run the VBA code. How can I avoid this action?
Here is the code:
Private Sub ComboBox1_Change()
Me.ComboBox1.List = Split(" Option1 Option2 Option3")
End Sub
ashley.odonnel wrote:
Re: How do I populate a combo box in microsoft office word 2003?
14-Jun-07
Thank you so much Jonathan. It works beautifully!
Previous Posts In This Thread:
How do I populate a combo box in microsoft office word 2003?
I am trying to create a form in word 2003 and I need an applicatio
where I can select more than one answer for a question. I therefor
am trying to create a combo box but I have no idea how to populat
it. I have tried entering the options that I want in the combo box i
the 'value' field but i only succeed in having one line
Any suggestions???
Re: How do I populate a combo box in microsoft office word 2003?
Me.ComboBox1.List = Split("Apple|Orange|Banana|Grape|Pomegranate|Mango",
"|"
--
Regard
Jonathan West - Word MV
www.intelligentdocuments.co.u
Please reply to the newsgrou
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org
Re: How do I populate a combo box in microsoft office word 2003?
Sorry Jonathan
But do I enter this in the value field in the properties menu?
Re: How do I populate a combo box in microsoft office word 2003?
Sorry, should have been clearer. You include it as a line of code in the
UserForm_Initialize event
--
Regard
Jonathan West - Word MV
www.intelligentdocuments.co.u
Please reply to the newsgrou
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org
Re: How do I populate a combo box in microsoft office word 2003?
Jonathan
I feel really ridiculous, but this is what i did and it did no
work...
I went to view code, then insert userform, and then i right clicked o
the grey box that appeared and went into view code and pasted the cod
you gave me above in this field....it didn't work...
I'm really sorry, I have never used forms before!
Proceed as follows1. insert your userform.2.
Proceed as follow
1. insert your userform
2. Create your combobox on the userform (call it ComboBox1 for now
3. right-click somewhere on the form (not on the combobox) and click "View
code
4. you will see the cursor positioned in its own line immediately below
"Private Sub UserForm_Click()". Change "UserForm_Click" to
"Userform_Initialize" (note the spelling - make sure you use the z)
5. Insert my line of code immediately after
6. Press F5 to run the userform. Click the button on the right of the
combobox to display the dropdown list
For more on creating UserForms, take a look her
How to create a Userfor
http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.ht
--
Regard
Jonathan West - Word MV
www.intelligentdocuments.co.u
Please reply to the newsgrou
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org
Re: How do I populate a combo box in microsoft office word 2003?
Thank you so much Jonathan. It works beautifully!
creating a combo box in word
Hello,
I created a combo box, but now every time I open it I have to run the VBA code. How can I avoid this?
Here is the code:
Private Sub ComboBox1_Change()
Me.ComboBox1.List = Split(" Option1 Option2 Option3")
End Sub
Stan
Submitted via EggHeadCafe - Software Developer Portal of Choice
SharePoint - Managing Unused or Archive sites automatically
http://www.eggheadcafe.com/tutorial...5b-a2a8deb60cad/sharepoint--managing-unu.aspx