Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

allow new value in word vba combobox

Posted on 2010-09-06
5
Medium Priority
?
681 Views
Last Modified: 2013-11-26
I have a combobox in my word vba application that gets it's list from an excel spreadsheet. I get these results using application.workbookfunction.match.

I want the combobox to allow new values to be typed in  if there is no match. How do I allow that?
0
Comment
Question by:karimjohnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Accepted Solution

by:
Cory Vandenberg earned 2000 total points
ID: 33611988
You cannot type new values into a combobox.  My suggestion is to use a combination of a text box and combobox.  Use a conditional to Enable the text box.  Basically, check to see if the Match result was #N/A, and if it was, enable the TextBox for user input.
0
 

Author Comment

by:karimjohnson
ID: 33612199
can you give me a code snippet for the test? Currently I set a variable to the rownumber that is found in the match statement. If no match is found I get an error.
0
 
LVL 18

Expert Comment

by:Cory Vandenberg
ID: 33614306
Post the code you currently have and I will see what I can do.
0
 
LVL 13

Expert Comment

by:gbanik
ID: 33617024
Yes... do post in more details about the problem.
You may want to solve this problem by conditionally showing a combobox and a text box.
0
 
LVL 34

Expert Comment

by:Norie
ID: 33620596
How are you populating a combobox using the worksheet function MATCH?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question