Solved

allow new value in word vba combobox

Posted on 2010-09-06
5
669 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
5 Comments
 
LVL 18

Accepted Solution

by:
WarCrimes earned 500 total points
Comment Utility
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
Comment Utility
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:WarCrimes
Comment Utility
Post the code you currently have and I will see what I can do.
0
 
LVL 13

Expert Comment

by:gbanik
Comment Utility
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 33

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now