# MS Word VBA test Combo Box Value



## swherton (Nov 8, 2008)

Hi, please can someone put me on the right path.

I have a combo box that has items in for a currency code. 

What I want to do is if the Code the user puts in isn't in the list I want to do something else.

So what I want to do is when the combo box is changed test to see if the entry is part of the list and if not do something else.

I've tried:

"If cboCCY.Value <> cboCCY.List Then"

but this doesn't seem to work. I've (in desparation) tried an IF statement :

"If cboCCY.Value <> "EUR" Then

for each item in the list but that still doesn't work and the code seems to act on the first character i.e. if EUR is a list item if I type E the codes immedately runs.

Please can someone let me know what I'm doing wrong. Have tried several books but can't find the solution.

The code is running under the change combo box click in a Form.


----------

