How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Greg Maxey Your Own Question

Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience:  Microsoft Word Most Valuable Professional (6 years)
16468162
Type Your Question Here...
Greg Maxey is online now
A new question is answered every 9 seconds

Ask a Microsoft Word Question when I create a combobox in

Resolved Question:

Ask a Microsoft Word Question
>when I create a combobox in Word 2007 and add the values in VBA, the values show up, but when I save the file and reopen...the combobox's are empty.....any suggestions?
Submitted: 3 years ago.
Category: General
Expert:  Greg Maxey replied 3 years ago.
Because of an ambiguous what? I won't be able to assit you further without a clear understanding of the problem. What kind of combobox? Content control or activeX control. What VBA code are you currently using.
Customer: replied 3 years ago.
I am trying to make an General form for ordering Eyeglasses. I have Ten activex ComboBoxes. I need to be able to have them pull down the info and fill out form and send it to me.(They will have this form on microsoft 2007) I currently have them sending me a similar version without comboboxs but they have to fill in a lot of items that are ordered frequently. This has been a really frustrating experience, just trying to add a pull down menu! And I don't like the look of the Content control box's.

I have used the VBA :example

Private Sub Document_Open()
ComboBox1.Clear
ComboBox1.AddItem "Select"
ComboBox1.AddItem "SV"
ComboBox1.AddItem "PAL"
ComboBox1.AddItem "Bifocal"
ComboBox1.AddItem "Trifocal"
ComboBox1.Value = "Select"
ComboBox2.Clear
ComboBox2.AddItem "Select"
ComboBox2.AddItem "TruClear"
ComboBox2.AddItem "TruClearHD"
ComboBox2.AddItem "Definity"
ComboBox2.AddItem "DefinitySht"
ComboBox2.AddItem "Comfort2"
ComboBox2.AddItem "Other"
ComboBox2.Value = "Select"
End Sub

It said ambigous name, because I have two Document_open, so I pilled them all into one.

I have also tried
separating them
With combobox
End With
End Sub

Thanks
Expert:  Greg Maxey replied 3 years ago.

Your form won't work with the code you have because everytime the document is opened the contents of the combobox list is 1. Cleared. 2. Recreated and 3. "Select" is set as the active value.

 

You should be creating new form documents using a template. In the template "ThisDocument" project module place the following code:

 

 

Private Sub Document_New()
ComboBox1.Clear
ComboBox1.AddItem "Select"
ComboBox1.AddItem "SV"
ComboBox1.AddItem "PAL"
ComboBox1.AddItem "Bifocal"
ComboBox1.AddItem "Trifocal"
ComboBox1.Value = "Select"
ComboBox2.Clear
ComboBox2.AddItem "Select"
ComboBox2.AddItem "TruClear"
ComboBox2.AddItem "TruClearHD"
ComboBox2.AddItem "Definity"
ComboBox2.AddItem "DefinitySht"
ComboBox2.AddItem "Comfort2"
ComboBox2.AddItem "Other"
ComboBox2.Value = "Select"
End Sub

 

Private Sub Document_Open()
Dim valCB1 As String
Dim valCB2 As String
valCB1 = ComboBox1.Value
valCB2 = ComboBox2.Value
ComboBox1.Clear
ComboBox1.AddItem "Select"
ComboBox1.AddItem "SV"
ComboBox1.AddItem "PAL"
ComboBox1.AddItem "Bifocal"
ComboBox1.AddItem "Trifocal"
ComboBox1.Value = valCB1
ComboBox2.Clear
ComboBox2.AddItem "Select"
ComboBox2.AddItem "TruClear"
ComboBox2.AddItem "TruClearHD"
ComboBox2.AddItem "Definity"
ComboBox2.AddItem "DefinitySht"
ComboBox2.AddItem "Comfort2"
ComboBox2.AddItem "Other"
ComboBox2.Value = valCB2
End Sub

 

Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience: Microsoft Word Most Valuable Professional (6 years)
Greg Maxey and 54 other General Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Ron

    ASE Certified Technician

    Satisfied Customers:

    21332
    23 years with Ford specializing in drivability and electrical and AC. Ford certs and ASE Certs
< Last | Next >
  • http://ww2.justanswer.com/uploads/FO/fordguy4u/2011-12-17_222940_HPIM1257.64x64.JPG Ron's Avatar

    Ron

    ASE Certified Technician

    Satisfied Customers:

    21332
    23 years with Ford specializing in drivability and electrical and AC. Ford certs and ASE Certs
  • http://ww2.justanswer.com/uploads/lyeung1/2010-07-25_032152_tn_IMG_0241.JPG Dr. Y.'s Avatar

    Dr. Y.

    Urologist

    Satisfied Customers:

    18450
    I am fellowship trained specializing in general urology and reconstructive urology.
  • http://ww2.justanswer.com/uploads/docjohn174/2008-12-13_170143_johnask.jpg John's Avatar

    John

    Home Appliance Technician

    Satisfied Customers:

    13453
    Appliance repair business owner for over 43 years.
  • http://ww2.justanswer.com/uploads/MU/multistatelaw/2011-11-27_173951_Tinaglamourshotworkglow102011.64x64.jpg Tina's Avatar

    Tina

    Lawyer

    Satisfied Customers:

    8529
    JD, BBA Over 25 years legal and business experience.
  • http://ww2.justanswer.com/uploads/dermdoc19/2010-09-30_160749_Photo_122807_015.JPG dermdoc19's Avatar

    dermdoc19

    Dermatologist

    Satisfied Customers:

    3877
    30 years practice in general and cosmetic dermatology
  • http://ww2.justanswer.com/uploads/BI/birddoctor/2012-6-22_173214_birddoctor.64x64.png Dr. Pat's Avatar

    Dr. Pat

    Bird Veterinarian

    Satisfied Customers:

    3403
    25+ years working primarily or exclusively with birds
  • http://ww2.justanswer.com/uploads/RY/rydergar/2012-6-6_192240_IMG0328.64x64.JPG Dr. Gary's Avatar

    Dr. Gary

    Cat Veterinarian

    Satisfied Customers:

    3313
    DVM, Emergency Veterinarian, BS (Physiology)